asdf-games/lib/TileSpriteXML.js

13 lines
299 B
JavaScript

var Sprite = require("./Sprite");
class TileSpriteXML extends Sprite {
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"];
}
}
module.exports = TileSpriteXML;