summaryrefslogtreecommitdiff
path: root/game/prefabs/bonusPill.js
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@entelect.co.za>2014-07-17 19:23:25 +0200
committerJustin Worthe <justin.worthe@entelect.co.za>2014-07-17 19:23:25 +0200
commit920eccd0fe8a8acc6ff03f4333a400a9782f6d1a (patch)
treed26ab4e1fbc08979ce4e219e9699d70587340ed0 /game/prefabs/bonusPill.js
parent95cecb4933b7b991308c91abcc99a5281c479765 (diff)
Added bonus pill and bumped phaser version
Diffstat (limited to 'game/prefabs/bonusPill.js')
-rw-r--r--game/prefabs/bonusPill.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/game/prefabs/bonusPill.js b/game/prefabs/bonusPill.js
new file mode 100644
index 0000000..1b7ae56
--- /dev/null
+++ b/game/prefabs/bonusPill.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var BonusPill = function(game, x, y, frame) {
+ Phaser.Sprite.call(this, game, x, y, 'bonus-pill', frame);
+ this.scale = {x: 0.01, y: 0.01};
+ this.anchor = {x: 0.5, y: 0.5};
+
+ this.game.physics.arcade.enableBody(this);
+ this.score = 10;
+};
+
+BonusPill.prototype = Object.create(Phaser.Sprite.prototype);
+BonusPill.prototype.constructor = BonusPill;
+
+module.exports = BonusPill;