Tileset dialog for Tilorswift and fix for adding rows.

This commit is contained in:
Mal
2020-02-14 00:12:24 +01:00
parent 72589544bd
commit 04c3d0253b
19 changed files with 297 additions and 52 deletions

View File

@@ -1,10 +1,15 @@
import GraphicSet from "../../js/GraphicSet.js";
import Setting from "../../js/Setting.js";
export default class Tileset
{
constructor(image, tiles, scale = 1)
constructor(setId)
{
this.image = image;
this.tiles = tiles;
this.scale = scale;
this.setId = setId;
this.image = new Image();
this.image.src = Setting.TILESET_LOCATION + GraphicSet[this.setId].tileset;
this.tiles = GraphicSet[this.setId].tiles;
this.scale = GraphicSet[this.setId].scale;
}
getWidth()