diff options
author | Justin Worthe <justin.worthe@entelect.co.za> | 2014-05-14 12:30:04 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@entelect.co.za> | 2014-05-14 12:30:04 +0200 |
commit | d0d4f4318cae17e65c738c595550b5e5a0904e05 (patch) | |
tree | 882f2fd9bdb0a1ddf46fa77bba50bd24092f5a40 /game/prefabs/player.js | |
parent | 98e5b9470fdc102765a289078b3967e3d94fcae0 (diff) |
Added scoring on colliding with pills
closes #4
Diffstat (limited to 'game/prefabs/player.js')
-rw-r--r-- | game/prefabs/player.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/game/prefabs/player.js b/game/prefabs/player.js index 1336003..b520947 100644 --- a/game/prefabs/player.js +++ b/game/prefabs/player.js @@ -6,6 +6,10 @@ var Player = function(game, x, y, key, frame) { this.moving = false; this.scale = {x: 0.01, y: 0.01}; this.anchor = {x: 0.5, y: 0.5}; + + this.game.physics.arcade.enableBody(this); + + this.score = 0; }; Player.prototype = Object.create(Phaser.Sprite.prototype); |