F1 to change tileset
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user