summaryrefslogtreecommitdiff
path: root/game/entities/pill.js
diff options
context:
space:
mode:
Diffstat (limited to 'game/entities/pill.js')
-rw-r--r--game/entities/pill.js14
1 files changed, 5 insertions, 9 deletions
diff --git a/game/entities/pill.js b/game/entities/pill.js
index 13054b0..af64a4c 100644
--- a/game/entities/pill.js
+++ b/game/entities/pill.js
@@ -1,18 +1,14 @@
'use strict';
-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};
+var EntityBase = require('../entities/entityBase');
+
+var Pill = function(game, x, y) {
+ EntityBase.call(this, game, x, y, 'pill');
this.score = 1;
};
-Pill.prototype = Object.create(Phaser.Sprite.prototype);
+Pill.prototype = Object.create(EntityBase.prototype);
Pill.prototype.constructor = Pill;
-Pill.prototype.getBounds = function() {
- return new Phaser.Rectangle(this.x, this.y, 0.2, 0.2);
-};
-
module.exports = Pill;