summaryrefslogtreecommitdiff
path: root/game/prefabs
diff options
context:
space:
mode:
Diffstat (limited to 'game/prefabs')
-rw-r--r--game/prefabs/bonusPill.js15
-rw-r--r--game/prefabs/pill.js4
2 files changed, 16 insertions, 3 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;
diff --git a/game/prefabs/pill.js b/game/prefabs/pill.js
index 50c0277..29bf7a2 100644
--- a/game/prefabs/pill.js
+++ b/game/prefabs/pill.js
@@ -6,12 +6,10 @@ var Pill = function(game, x, y, frame) {
this.anchor = {x: 0.5, y: 0.5};
this.game.physics.arcade.enableBody(this);
+ this.score = 1;
};
Pill.prototype = Object.create(Phaser.Sprite.prototype);
Pill.prototype.constructor = Pill;
-Pill.prototype.update = function() {
-};
-
module.exports = Pill;