examples/moveplayer: default dx and dy to 0 for the player

This commit is contained in:
Kazhnuz 2019-04-07 18:15:06 +02:00
parent 134edf345a
commit 5ec137416e

View file

@ -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