diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2014-09-24 17:20:56 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2014-09-24 17:20:56 +0200 |
commit | 17ebd1e3857d47ad5fd94e40283ecd468dd83739 (patch) | |
tree | 6e65cf51bc9411af4c2d77a274838cebd32df85c /game/entities/wall.js | |
parent | 1eabe62fcf61001a10b1965da0cf3a4ae741a25b (diff) |
Moved common game entity code into parent class
Diffstat (limited to 'game/entities/wall.js')
-rw-r--r-- | game/entities/wall.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/game/entities/wall.js b/game/entities/wall.js index c4eee79..8a6e45d 100644 --- a/game/entities/wall.js +++ b/game/entities/wall.js @@ -1,12 +1,12 @@ 'use strict'; -var Wall = function(game, x, y, frame) { - Phaser.Sprite.call(this, game, x, y, 'wall', frame); - this.scale = {x: 0.01, y: 0.01}; - this.anchor = {x: 0.5, y: 0.5}; +var EntityBase = require('../entities/entityBase'); + +var Wall = function(game, x, y) { + EntityBase.call(this, game, x, y, 'wall'); }; -Wall.prototype = Object.create(Phaser.Sprite.prototype); +Wall.prototype = Object.create(EntityBase.prototype); Wall.prototype.constructor = Wall; module.exports = Wall; |