Made HasPressed function and implemented it
This commit is contained in:
10
main.lua
10
main.lua
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user