|
@@ -21,8 +21,10 @@ namespace GFGGame
|
|
|
private int needNum;
|
|
|
//游戏结束时长(配置)
|
|
|
private int gameTime = 120;
|
|
|
- //游戏当前时长
|
|
|
+ //游戏当前时长倒计时
|
|
|
private int currentGameTime = 120;
|
|
|
+ //当前游戏时长
|
|
|
+ private int timeIndex = 0;
|
|
|
//进度条
|
|
|
private float barTime = 120.0f;
|
|
|
//行数
|
|
@@ -130,6 +132,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void UpdateView()
|
|
|
{
|
|
|
+ timeIndex = 0;
|
|
|
currentGameTime = gameTime;
|
|
|
currentCardNum = cardNum;
|
|
|
barTime = (float)gameTime;
|
|
@@ -257,6 +260,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void UpdateTime(object param = null)
|
|
|
{
|
|
|
+ timeIndex++;
|
|
|
currentGameTime--;
|
|
|
//_ui.m_ScareBar.value = currentGameTime;
|
|
|
_ui.m_timeText.text = string.Format ("{0}", currentGameTime);
|
|
@@ -282,7 +286,7 @@ namespace GFGGame
|
|
|
Timers.inst.Remove(UpdateBar);
|
|
|
if (isPass)
|
|
|
{
|
|
|
- ViewManager.Show<ResultTipsView>(new object[] { isPass, typeof(FlipGameView).FullName, currentGameTime });
|
|
|
+ ViewManager.Show<ResultTipsView>(new object[] { isPass, typeof(FlipGameView).FullName, timeIndex });
|
|
|
}
|
|
|
else
|
|
|
{
|