Made HasPressed function and implemented it

This commit is contained in:
bizcochito
2022-01-19 14:55:15 +01:00
parent 0305dd4fc2
commit 03793e1fb8
3 changed files with 47 additions and 35 deletions

View File

@@ -66,7 +66,7 @@ function love.update(dt)
--keypressed
if Keybind:Check(Keybind.menu.pause) then
if Keybind:HasPressed(Keybind.menu.pause) then
if do_pause then
do_pause = false
else
@@ -75,7 +75,7 @@ function love.update(dt)
end
end
if Keybind:Check(Keybind.debug.debug) then
if Keybind:HasPressed(Keybind.debug.debug) then
if debug then
debug = false
debug_collision = true
@@ -86,17 +86,17 @@ function love.update(dt)
end
end
if Keybind:Check(Keybind.debug.reposition) then
if Keybind:HasPressed(Keybind.debug.reposition) then
if not editor_mode then
main_Player.pos.x, main_Player.pos.y = 16,-10
end
end
if Keybind:Check(Keybind.debug.reload) then
if Keybind:HasPressed(Keybind.debug.reload) then
LoadLevel()
end
if Keybind:Check(Keybind.debug.editor) then
if Keybind:HasPressed(Keybind.debug.editor) then
if editor_mode then
editor_mode = false
else