From d0d4f4318cae17e65c738c595550b5e5a0904e05 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Wed, 14 May 2014 12:30:04 +0200 Subject: Added scoring on colliding with pills closes #4 --- game/prefabs/pill.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'game/prefabs/pill.js') diff --git a/game/prefabs/pill.js b/game/prefabs/pill.js index 2df13f2..50c0277 100644 --- a/game/prefabs/pill.js +++ b/game/prefabs/pill.js @@ -4,17 +4,14 @@ var Pill = function(game, x, y, frame) { Phaser.Sprite.call(this, game, x, y, 'pill', frame); this.scale = {x: 0.01, y: 0.01}; this.anchor = {x: 0.5, y: 0.5}; - // initialize your prefab here + this.game.physics.arcade.enableBody(this); }; Pill.prototype = Object.create(Phaser.Sprite.prototype); Pill.prototype.constructor = Pill; Pill.prototype.update = function() { - - // write your prefab's specific update code here - }; module.exports = Pill; -- cgit v1.2.3