From b84c53b111c38075cc27f82c5196dfeac5ec0738 Mon Sep 17 00:00:00 2001 From: Arne van Iterson Date: Wed, 29 Apr 2020 13:49:05 +0200 Subject: [PATCH] Fixed class variable naming error in TileSpriteXML --- lib/TileSpriteXML.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); } }