Corrected parenthesis bug

This commit is contained in:
Thomas FORGIONE 2015-05-11 14:41:22 +02:00
parent c0cca33814
commit fce7adb495
1 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ CameraSelecter.prototype.update = function(event) {
var hovered = this.pointedCamera(event); var hovered = this.pointedCamera(event);
if (hovered !== undefined && !hovered instanceof Coin) { if (hovered !== undefined && !(hovered instanceof Coin)) {
this.prev.x = this.mouse.x; this.prev.x = this.mouse.x;
this.prev.y = this.mouse.y; this.prev.y = this.mouse.y;
this.prev.camera = hovered; this.prev.camera = hovered;
@ -74,7 +74,7 @@ CameraSelecter.prototype.update = function(event) {
CameraSelecter.prototype.click = function(event) { CameraSelecter.prototype.click = function(event) {
var newCamera = this.pointedCamera(event); var newCamera = this.pointedCamera(event);
if (newCamera !== undefined && !newCamera instanceof Coin) { if (newCamera !== undefined && !(newCamera instanceof Coin)) {
this.cameras.mainCamera().moveHermite(newCamera); this.cameras.mainCamera().moveHermite(newCamera);
buttonManager.updateElements(); buttonManager.updateElements();
} else if (newCamera instanceof Coin) { } else if (newCamera instanceof Coin) {