more editor work on handling entity spawns

This commit is contained in:
lustlion
2022-03-10 10:21:10 +01:00
parent 6e76607030
commit 39b65571a0
10 changed files with 91 additions and 8 deletions

View File

@@ -139,6 +139,7 @@ function drawEditor()
drawGameworldForeground()
endGameworldDraw()
doEditorEdit()
drawSpawns()
drawEditorRooms()
drawSelectingPaletteTile()
@@ -206,15 +207,18 @@ function doEditorEdit()
and love.keyboard.isDown("lshift") ~= true
and love.keyboard.isDown("lctrl") ~= true
then
if Keybind:checkDown(Keybind.generic.lclick)
and selecting_tile ~= nil
then
setTile(vertical,horizontal,selecting_tile)
elseif Keybind:checkDown(Keybind.generic.rclick) then
setTile(vertical,horizontal,0)
if selecting_tile ~= nil then
if Keybind:checkDown(Keybind.generic.lclick) then
setTile(vertical,horizontal,selecting_tile)
elseif Keybind:checkDown(Keybind.generic.rclick) then
setTile(vertical,horizontal,0)
end
reloadLevelTiles()
else
if Keybind:checkDown(Keybind.generic.lclick) then
selectSpawns(mouse_x,mouse_y)
end
end
reloadLevelTiles()
elseif Keybind:checkPressed(Keybind.generic.lshift) then
expandLevelCanvas(math.sign(expand_h),math.sign(expand_v))
reloadLevelTiles()