F1 to change tileset

This commit is contained in:
lustlion
2022-01-30 12:01:10 +01:00
parent a703af5e8d
commit 727592ac55
5 changed files with 383 additions and 353 deletions

View File

@@ -25,6 +25,32 @@ function EditorStep()
Camera.pos.y = Camera.pos.y + 3*game.scale
end
if palette then
if Keybind:HasPressed(Keybind.debug.debug) then
local next = false
local export = nil
for k, v in pairs(tileset) do
if export == nil then
export = v
end
if next then
LevelData.tileset = v
next = false
break
end
if v == LevelData.tileset then
next = true
end
end
if next then
LevelData.tileset = export
end
LevelGetTileData()
LevelIndexTiles()
end
end
if Keybind:HasPressed(Keybind.debug.reload) then
ExportLevel("test")
end