asdf-games/lib/TileSpriteXML.js

13 lines
335 B
JavaScript
Raw Normal View History

2020-02-29 13:45:56 +01:00
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'];
}
}
2020-02-29 13:45:56 +01:00
module.exports = TileSpriteXML;