summaryrefslogtreecommitdiff
path: root/game/entities/entityBase.js
blob: 1c70b92ca81b57bf05ed99ae277c7dcd628cb8e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use strict';

var EntityBase = function(game, x, y, key) {
  Phaser.Sprite.call(this, game, x, y, key);
  this.scale = {x: 0.01, y: 0.01};
  this.anchor = {x: 0.5, y: 0.5};
};
EntityBase.prototype = Object.create(Phaser.Sprite.prototype);

EntityBase.prototype.getBounds = function() {
  return new Phaser.Rectangle(this.x, this.y, 0.5, 0.5);
};

module.exports = EntityBase;