summaryrefslogtreecommitdiff
path: root/game/entities/bonusPill.js
diff options
context:
space:
mode:
Diffstat (limited to 'game/entities/bonusPill.js')
-rw-r--r--game/entities/bonusPill.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/game/entities/bonusPill.js b/game/entities/bonusPill.js
new file mode 100644
index 0000000..dd8dfce
--- /dev/null
+++ b/game/entities/bonusPill.js
@@ -0,0 +1,18 @@
+'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.score = 10;
+};
+
+BonusPill.prototype = Object.create(Phaser.Sprite.prototype);
+BonusPill.prototype.constructor = BonusPill;
+
+BonusPill.prototype.getBounds = function() {
+ return new Phaser.Rectangle(this.x, this.y, 0.2, 0.2);
+};
+
+module.exports = BonusPill;