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
|
end
|
||||||
|
|
||||||
function Player:update(dt)
|
function Player:update(dt)
|
||||||
local dx, dy
|
local dx, dy = 0, 0
|
||||||
if self.keys["up"].isPressed then
|
if self.keys["up"].isPressed then
|
||||||
dy = -120 * dt
|
dy = -120 * dt
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue