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 imageLoader = new ImageLoader();
|
2023-09-19 11:44:56 +02:00
|
|
|
|
|
|
|
for (const graphicSet of GraphicSet) {
|
|
|
|
imageLoader.addImage('../' + Setting.TILESET_LOCATION + graphicSet.tileset);
|
|
|
|
}
|
|
|
|
|
2023-09-19 01:14:15 +02:00
|
|
|
imageLoader.onLoad = () => {
|
2023-09-19 11:44:56 +02:00
|
|
|
Level.createFromFile(
|
|
|
|
'../levels/moonbase.json',
|
|
|
|
(level) => {
|
|
|
|
const tilorswift = new Tilorswift(level);
|
|
|
|
tilorswift.loadLevel();
|
|
|
|
tilorswift.init();
|
|
|
|
}
|
|
|
|
);
|
2020-02-16 00:53:03 +01:00
|
|
|
}
|
2023-09-19 01:14:15 +02:00
|
|
|
imageLoader.load();
|