2020-02-29 13:45:56 +01:00
|
|
|
var Sprite = require("./Sprite");
|
2019-12-31 15:33:27 +01:00
|
|
|
|
|
|
|
class TileSpriteXML extends Sprite {
|
2020-03-21 17:22:28 +01:00
|
|
|
constructor(texture, xml, index) {
|
|
|
|
super(texture);
|
|
|
|
var src = xml.array[index];
|
|
|
|
this.imgPos = { x: src["x"], y: src["y"] };
|
|
|
|
this.width = src["width"];
|
|
|
|
this.height = src["height"];
|
|
|
|
}
|
2019-12-31 15:33:27 +01:00
|
|
|
}
|
|
|
|
|
2020-02-29 13:45:56 +01:00
|
|
|
module.exports = TileSpriteXML;
|