skippable cutscenes, parttest scene
This commit is contained in:
parent
6144b1b433
commit
c518faadef
4 changed files with 40 additions and 3 deletions
|
@ -154,6 +154,11 @@ function beginEndCutscene()
|
|||
smYl = {80,80,120}
|
||||
platformY = -imgEndPlatform.height
|
||||
mompos = -100
|
||||
|
||||
rocketadd = playdate.timer.new(400)
|
||||
rocketadd.discardOnCompletion = false
|
||||
local partsadd = false
|
||||
|
||||
song:stop()
|
||||
song:load("sfx/song4")
|
||||
|
||||
|
|
|
@ -24,6 +24,12 @@ import "Editor"
|
|||
mode = "menu"
|
||||
map = "data/level.rocketbyte"
|
||||
|
||||
function playdate.deviceDidUnlock()
|
||||
if playdate.buttonIsPressed(playdate.kButtonDown) and playdate.buttonIsPressed(playdate.kButtonB) then
|
||||
mode = "partTest"
|
||||
end
|
||||
end
|
||||
|
||||
deaths = 0
|
||||
energy = 0
|
||||
totalEnergy = 0
|
||||
|
@ -65,6 +71,16 @@ menuButton, error = menu:addMenuItem("game menu", function()
|
|||
elseif mode == "editor" then
|
||||
editClose()
|
||||
song:play(0)
|
||||
elseif mode == "startCutscene" or mode == "endCutscene" then
|
||||
local ts = playdate.timer.allTimers()
|
||||
song:stop()
|
||||
song:load("sfx/song1")
|
||||
createStars()
|
||||
for i = 1, #ts, 1 do
|
||||
ts[i]:remove()
|
||||
end
|
||||
|
||||
song:play()
|
||||
end
|
||||
|
||||
if mode =="game" or mode == "play" then
|
||||
|
@ -72,7 +88,7 @@ menuButton, error = menu:addMenuItem("game menu", function()
|
|||
removeMap()
|
||||
killBlades()
|
||||
end
|
||||
if mode ~= "music" and mode ~= "startCutscene" and mode ~="endCutscene"then
|
||||
if mode ~= "music"then
|
||||
totalEnergy = 0
|
||||
showEnergy = false
|
||||
energy = 0
|
||||
|
@ -107,6 +123,8 @@ function playdate.update()
|
|||
if mode == "menu" then
|
||||
updateMenu()
|
||||
processExplosions()
|
||||
elseif mode == "partTest" then
|
||||
testParts()
|
||||
elseif mode == "startCutscene" or mode == "startCutsceneReplay" then
|
||||
updateStartCutscene()
|
||||
elseif mode == "endCutscene" then
|
||||
|
|
|
@ -218,11 +218,11 @@ function menuButtonPress(name, index)
|
|||
mode = "game"
|
||||
|
||||
elseif name == "START CUTSCENE" then
|
||||
local m = {"BACK","WATCH START CUTSCENE", "UNSKIPPABLE"}
|
||||
local m = {"BACK","WATCH START CUTSCENE"}
|
||||
m[0] = "dat"
|
||||
createMenu(m)
|
||||
elseif name == "END CUTSCENE" then
|
||||
local m = {"BACK","WATCH END CUTSCENE","UNSKIPPABLE"}
|
||||
local m = {"BACK","WATCH END CUTSCENE"}
|
||||
m[0] = "dat"
|
||||
createMenu(m)
|
||||
elseif name == "WATCH START CUTSCENE" then
|
||||
|
|
|
@ -114,3 +114,17 @@ function applyStarSpeed(_x,_y)
|
|||
star.dy+=_y
|
||||
end
|
||||
end
|
||||
|
||||
function testParts()
|
||||
gfx.clear()
|
||||
processStars(-10,-10)
|
||||
processExplosions()
|
||||
|
||||
gfx.drawText("PARTICLES TEST", 200-(gfx.getTextSize("PARTICLES TEST")/2), 6)
|
||||
gfx.drawText("BIG", 100-(gfx.getTextSize("BIG")/2), 200)
|
||||
gfx.drawText("SMALL", 300-(gfx.getTextSize("SMALL")/2), 200)
|
||||
if playdate.buttonJustPressed(playdate.kButtonA) then
|
||||
explode(100,120)
|
||||
miniExplode(300,120)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue