summaryrefslogtreecommitdiff
path: root/game/prefabs/player.js
diff options
context:
space:
mode:
Diffstat (limited to 'game/prefabs/player.js')
-rw-r--r--game/prefabs/player.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/game/prefabs/player.js b/game/prefabs/player.js
index b520947..0f6cb18 100644
--- a/game/prefabs/player.js
+++ b/game/prefabs/player.js
@@ -10,6 +10,7 @@ var Player = function(game, x, y, key, frame) {
this.game.physics.arcade.enableBody(this);
this.score = 0;
+ this.isMyTurn = false;
};
Player.prototype = Object.create(Phaser.Sprite.prototype);
@@ -19,7 +20,7 @@ Player.prototype.update = function() {
};
Player.prototype.move = function(newX, newY) {
- if (this.moving) {
+ if (this.moving || !this.isMyTurn) {
return;
}