This commit is contained in:
2024-06-01 22:46:36 +03:00
parent 29a5ed2f62
commit f19610e458
12 changed files with 543 additions and 451 deletions

View File

@@ -1,7 +1,7 @@
Ground = {}
class("Ground").extends(Graphics.sprite)
local groundImage = playdate.graphics.image.new("assets/sprites/groundFin")
local groundImage = Graphics.image.new("assets/sprites/groundFin")
function Ground:init(x, y, player)
Ground.super.init(self, groundImage)
@@ -24,6 +24,12 @@ function Ground:setMoveSpeed(speed)
end
function Ground:update()
-- Stop ground
if Ground.moveSpeed == 0 then
return
end
-- Speedup when player is moving right
if Ground.player.isMovingRight() == false then
Ground.moveSpeed = 0.2