Skip to content

Commit

Permalink
Make LEFT+RIGHT work like KP1
Browse files Browse the repository at this point in the history
  • Loading branch information
TomK32 committed Nov 30, 2012
1 parent 815f502 commit 8452f49
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.lua
Expand Up @@ -41,13 +41,16 @@ function love.update(dt)
kp1 = { x = - moves, y = moves },
kp3 = { x = moves, y = moves },
}
movement = {x = 0, y = 0}
for key, m in pairs(movements) do
if love.keyboard.isDown(key) then
dt_since_last_move = 0
moved = true
game_state.player:move(m, love.keyboard.isDown('rshift', 'lshift'))
movement.x = movement.x + m.x
movement.y = movement.y + m.y
end
end
game_state.player:move(movement, love.keyboard.isDown('rshift', 'lshift'))
end
end
dt_since_last_move = dt_since_last_move + dt
Expand Down

0 comments on commit 8452f49

Please sign in to comment.