adjusted hook to be toggle; renamed HasPressed to CheckPressed (keybind)

This commit is contained in:
lustlion
2022-02-12 20:03:48 +01:00
parent 6566e6fbab
commit 9d1e59b46a
6 changed files with 107 additions and 26 deletions

View File

@@ -20,7 +20,7 @@ function GameStep()
Camera:positionCenterAt(main_Player.pos.x, main_Player.pos.y)
--camera:positionAt(main_Player.pos.x, main_Player.pos.y,game.width,game.height)
if Keybind:HasPressed(Keybind.debug.debug) then
if Keybind:CheckPressed(Keybind.debug.debug) then
if debug then
debug = false
debug_collision = true
@@ -31,19 +31,19 @@ function GameStep()
end
end
if Keybind:HasPressed(Keybind.debug.reposition) then
if Keybind:CheckPressed(Keybind.debug.reposition) then
if not editor_mode then
main_Player.pos.x, main_Player.pos.y = 16,-10
end
end
if Keybind:HasPressed(Keybind.debug.reload) then
if Keybind:CheckPressed(Keybind.debug.reload) then
MenuClear()
menu_type = "dialog"
MenuInit("dialog",DialogSequence.Example)
end
if Keybind:HasPressed(Keybind.debug.editor) then
if Keybind:CheckPressed(Keybind.debug.editor) then
editor_mode = true
end
end