2020-02-02 23:00:14 +01:00
|
|
|
import Tilorswift from "./Tilorswift.js";
|
2023-09-19 01:14:15 +02:00
|
|
|
import Level from "../../js/Level.js";
|
|
|
|
import ImageLoader from "../../js/ImageLoader.js";
|
2020-02-14 00:12:24 +01:00
|
|
|
import GraphicSet from "../../js/GraphicSet.js";
|
|
|
|
import Setting from "../../js/Setting.js";
|
2020-01-30 23:40:42 +01:00
|
|
|
|
2023-09-19 01:14:15 +02:00
|
|
|
const level = Level.createFromFile('../levels/moonbase.json');
|
|
|
|
const imageLoader = new ImageLoader();
|
|
|
|
imageLoader.addImage('../' + Setting.TILESET_LOCATION + GraphicSet[level.terrain.tileset.setId].tileset);
|
|
|
|
imageLoader.onLoad = () => {
|
|
|
|
const tilorswift = new Tilorswift(level);
|
|
|
|
tilorswift.init();
|
|
|
|
tilorswift.loadLevel();
|
2020-02-16 00:53:03 +01:00
|
|
|
}
|
2023-09-19 01:14:15 +02:00
|
|
|
imageLoader.load();
|