examples/moveplayer: default dx and dy to 0 for the player
This commit is contained in:
parent
134edf345a
commit
5ec137416e
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ function Player:new(world, x, y)
|
|||
end
|
||||
|
||||
function Player:update(dt)
|
||||
local dx, dy
|
||||
local dx, dy = 0, 0
|
||||
if self.keys["up"].isPressed then
|
||||
dy = -120 * dt
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue