diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2014-09-21 10:31:48 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2014-09-21 10:31:48 +0200 |
commit | c508e9ef283a4069ea1af923ca1a241d2c954a1e (patch) | |
tree | 930f8ad620fdde4e1668cd1909fc9eaca35fcae1 /game/entities/poisonPill.js | |
parent | 48049a71ab041d8b109e2a7a12a8439ed3be812a (diff) |
Renamed prefab folder
Diffstat (limited to 'game/entities/poisonPill.js')
-rw-r--r-- | game/entities/poisonPill.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/game/entities/poisonPill.js b/game/entities/poisonPill.js new file mode 100644 index 0000000..408f77f --- /dev/null +++ b/game/entities/poisonPill.js @@ -0,0 +1,18 @@ +'use strict'; + +var PoisonPill = function(game, x, y, frame) { + Phaser.Sprite.call(this, game, x, y, 'poison-pill', frame); + this.scale = {x: 0.01, y: 0.01}; + this.anchor = {x: 0.5, y: 0.5}; + + this.score = 1; +}; + +PoisonPill.prototype = Object.create(Phaser.Sprite.prototype); +PoisonPill.prototype.constructor = PoisonPill; + +PoisonPill.prototype.getBounds = function() { + return new Phaser.Rectangle(this.x, this.y, 0.2, 0.2); +}; + +module.exports = PoisonPill; |