Add torikan animation

This commit is contained in:
Not-A-Normal-Robot
2023-09-16 19:12:52 +07:00
parent 7141f46948
commit bc99af5b1b
6 changed files with 27 additions and 6 deletions

View File

@@ -261,7 +261,7 @@ return {
elseif s==5 then
if P.stat.frame>420*60 then
D.pt=500
P:win('finish')
P:torikanEnd(420)
return
else
BG.set('glow')

View File

@@ -40,7 +40,7 @@ return {
elseif s==5 then
if P.stat.frame>183*60 then
D.pt=500
P:win('finish')
P:torikanEnd(183)
return
else
E.bone=true

View File

@@ -38,9 +38,9 @@ return {
elseif s==4 then
BG.set('rainbow2')
elseif s==5 then
if P.stat.frame>260*60 then
if P.stat.time>260 then
D.pt=500
P:win('finish')
P:torikanEnd(260)
return
else
P.gameEnv.freshLimit=10

View File

@@ -54,7 +54,7 @@ return {
win="Win!",
lose="Lose",
torikan="Ended",
finish="Finished",
gamewin="You Won",
gameover="Game Over",

View File

@@ -2815,6 +2815,27 @@ function Player:revive()
playClearSFX(3)
SFX.play('emit')
end
function Player:torikanEnd(requiredTime)
if self.stat.time < requiredTime then
return false
end
self:_die()
self.result='torikan'
if self.type=='human' then
GAME.result='torikan'
SFX.play('win')
VOC.play('win')
end
self:_showText(text.torikan,0,0,90,'beat',.5,.2)
self:_showText(STRING.time(self.stat.time).." / "..STRING.time(requiredTime),0,160,30,'beat',.5,.2)
self:_showText("(+"..STRING.time_short(self.stat.time-requiredTime)..")",0,200,30,'beat',.5,.2)
if self.type=='human' then
gameOver()
TASK.new(task_autoPause)
end
self:newTask(task_finish)
return true
end
function Player:win(result)
if self.result then
return