move repeatedly in direction

This commit is contained in:
Your Name 2026-08-07 02:01:39 -04:00
parent e065ab83de
commit f8e3d78332
5 changed files with 126 additions and 62 deletions

View file

@ -41,7 +41,12 @@ function love.load()
end
function love.update(dt)
Input:handler(dt)
if editorView == "world" then
Input:stopMoveRepeat()
else
local repeatedMove = Input:handler(dt)
if repeatedMove then currentRoom:movePlayer(repeatedMove) end
end
currentRoom:update(dt)
-- if love.keyboard.isDown("w") then worldSha = worldSha + 1 end
@ -94,6 +99,7 @@ end
function love.keypressed(key)
if editorView ~= "world" and Input.isPlayerMove(key) then
Input:beginMove(key)
currentRoom:movePlayer(key)
elseif editorView ~= "world" and Input.isPlayerSwitch(key) then
local c = Input.playerColor(key)