Add torikan animation
This commit is contained in:
Submodule Zframework updated: c498582a8c...e16a9161cc
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -54,7 +54,7 @@ return {
|
||||
|
||||
win="Win!",
|
||||
lose="Lose",
|
||||
|
||||
torikan="Ended",
|
||||
finish="Finished",
|
||||
gamewin="You Won",
|
||||
gameover="Game Over",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user