Add torikan animation
This commit is contained in:
Submodule Zframework updated: c498582a8c...e16a9161cc
@@ -261,7 +261,7 @@ return {
|
|||||||
elseif s==5 then
|
elseif s==5 then
|
||||||
if P.stat.frame>420*60 then
|
if P.stat.frame>420*60 then
|
||||||
D.pt=500
|
D.pt=500
|
||||||
P:win('finish')
|
P:torikanEnd(420)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
BG.set('glow')
|
BG.set('glow')
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ return {
|
|||||||
elseif s==5 then
|
elseif s==5 then
|
||||||
if P.stat.frame>183*60 then
|
if P.stat.frame>183*60 then
|
||||||
D.pt=500
|
D.pt=500
|
||||||
P:win('finish')
|
P:torikanEnd(183)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
E.bone=true
|
E.bone=true
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ return {
|
|||||||
elseif s==4 then
|
elseif s==4 then
|
||||||
BG.set('rainbow2')
|
BG.set('rainbow2')
|
||||||
elseif s==5 then
|
elseif s==5 then
|
||||||
if P.stat.frame>260*60 then
|
if P.stat.time>260 then
|
||||||
D.pt=500
|
D.pt=500
|
||||||
P:win('finish')
|
P:torikanEnd(260)
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
P.gameEnv.freshLimit=10
|
P.gameEnv.freshLimit=10
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ return {
|
|||||||
|
|
||||||
win="Win!",
|
win="Win!",
|
||||||
lose="Lose",
|
lose="Lose",
|
||||||
|
torikan="Ended",
|
||||||
finish="Finished",
|
finish="Finished",
|
||||||
gamewin="You Won",
|
gamewin="You Won",
|
||||||
gameover="Game Over",
|
gameover="Game Over",
|
||||||
|
|||||||
@@ -2815,6 +2815,27 @@ function Player:revive()
|
|||||||
playClearSFX(3)
|
playClearSFX(3)
|
||||||
SFX.play('emit')
|
SFX.play('emit')
|
||||||
end
|
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)
|
function Player:win(result)
|
||||||
if self.result then
|
if self.result then
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user