2019-12-31 15:33:27 +01:00
|
|
|
import Sprite from "./Sprite.js";
|
|
|
|
|
|
|
|
class TileSpriteXML extends Sprite {
|
2020-01-17 21:11:15 +01:00
|
|
|
constructor(texture, xml, index) {
|
2019-12-31 15:33:27 +01:00
|
|
|
super(texture);
|
|
|
|
var src = xml.array[index];
|
|
|
|
this.imgPos = { x: src['x'], y: src['y'] };
|
|
|
|
this.width = src['width'];
|
|
|
|
this.height = src['height'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default TileSpriteXML;
|