diff --git a/lib/TileSpriteXML.js b/lib/TileSpriteXML.js index b2b0543..0caa1dc 100644 --- a/lib/TileSpriteXML.js +++ b/lib/TileSpriteXML.js @@ -6,8 +6,8 @@ class TileSpriteXML extends Sprite { super(texture); var src = xml.array[index]; this.imgPos = { x: src["x"], y: src["y"] }; - this.width = src["width"]; - this.height = src["height"]; + this.w = src["width"]; + this.h = src["height"]; this.anims = new AnimManager(this); } @@ -16,11 +16,11 @@ class TileSpriteXML extends Sprite { } get w() { - return this.width * Math.abs(this.scale.x); + return this.w * Math.abs(this.scale.x); } get h() { - return this.height * Math.abs(this.scale.y); + return this.h * Math.abs(this.scale.y); } }