inertia and refactor
This commit is contained in:
@@ -45,6 +45,8 @@ end
|
||||
function scene:start()
|
||||
scene.super.start(self)
|
||||
|
||||
playdate.ui.crankIndicator:draw() -- not sure why this is not working
|
||||
|
||||
self.optionsMenu:addMenuItem("Main Menu", function() Noble.transition(Menu) end)
|
||||
Noble.showFPS = true
|
||||
end
|
||||
@@ -52,22 +54,22 @@ end
|
||||
function scene:spawnBaleba()
|
||||
local balebaCount = #scene.balebas
|
||||
if balebaCount >= 6 then
|
||||
scene.balebaSpawner:remove()
|
||||
return
|
||||
end
|
||||
|
||||
scene.balebas[balebaCount + 1] = Baleba(math.random(410, 900), math.random(10, 210), scene.player, true)
|
||||
|
||||
return scene.balebas[balebaCount + 1]
|
||||
--scene.balebas[balebaCount + 1] = Baleba(math.random(410, 900), math.random(10, 210), scene.player, true)
|
||||
end
|
||||
|
||||
function scene:enter()
|
||||
scene.super.enter(self)
|
||||
|
||||
|
||||
scene.player = Player(150, 100)
|
||||
scene.ground = Ground(0, 225, scene.player)
|
||||
|
||||
scene.balebaSpawner.timerEndedCallback = function()
|
||||
--scene.balebas[k] = scene:spawnBaleba()
|
||||
scene:spawnBaleba()
|
||||
end
|
||||
|
||||
for i = 1, 3 do
|
||||
@@ -107,7 +109,11 @@ function scene:update()
|
||||
|
||||
playdate.timer.performAfterDelay(4000, function()
|
||||
scene.resultShowed = true
|
||||
c = notify("Nice", function()
|
||||
local message = "You failed!"
|
||||
if scene.player.targetDone then
|
||||
message = "You did it!"
|
||||
end
|
||||
c = notify(message, function()
|
||||
Noble.transition(Menu)
|
||||
c:remove()
|
||||
end)
|
||||
|
Reference in New Issue
Block a user