|
|
@@ -12,8 +12,17 @@ public class GameTimeCounterSA : MonoBehaviour
|
|
|
long _pauseTimePoint;
|
|
|
const long PayTimeCountDown = 10 * 1000;
|
|
|
|
|
|
+ string coinContinueGameUnit;
|
|
|
+ string remainingTimeUnit;
|
|
|
+ string minutesUnit;
|
|
|
+ string secondsUnit;
|
|
|
void Start()
|
|
|
{
|
|
|
+ coinContinueGameUnit = TextAutoLanguage2.GetTextByKey("CoinContinueGame");
|
|
|
+ remainingTimeUnit = TextAutoLanguage2.GetTextByKey("RemainingTime");
|
|
|
+ minutesUnit = TextAutoLanguage2.GetTextByKey("Minutes");
|
|
|
+ secondsUnit = TextAutoLanguage2.GetTextByKey("Seconds");
|
|
|
+
|
|
|
StandaloneAPI.StartGameTimeCountDown();
|
|
|
}
|
|
|
|
|
|
@@ -27,7 +36,8 @@ public class GameTimeCounterSA : MonoBehaviour
|
|
|
}
|
|
|
|
|
|
StandaloneAPI.DoGameTimeCountDown();
|
|
|
- playTimeText.text = string.Format("剩余时间{0}", GetTimeStr());
|
|
|
+ //"剩余时间{0}"
|
|
|
+ playTimeText.text = string.Format(remainingTimeUnit, GetTimeStr());
|
|
|
if (StandaloneAPI.GetGameTimeCountDown() > 0)
|
|
|
{
|
|
|
if (_paused)
|
|
|
@@ -48,7 +58,8 @@ public class GameTimeCounterSA : MonoBehaviour
|
|
|
}
|
|
|
long t = PayTimeCountDown - (JCUnityLib.TimeUtils.GetTimestamp() - _pauseTimePoint);
|
|
|
if (t <= 0) t = 0;
|
|
|
- payTimeCountDownText.text = string.Format("投币继续游戏\n{0}S", t / 1000);
|
|
|
+ //"投币继续游戏\n{0}S"
|
|
|
+ payTimeCountDownText.text = string.Format(coinContinueGameUnit, t / 1000);
|
|
|
if (t == 0) StandaloneAPI.ForceBackHome();
|
|
|
}
|
|
|
//#if UNITY_EDITOR
|
|
|
@@ -61,8 +72,8 @@ public class GameTimeCounterSA : MonoBehaviour
|
|
|
long second = StandaloneAPI.GetGameTimeCountDown() / 1000;
|
|
|
long minute = second / 60;
|
|
|
second = second % 60;
|
|
|
- string str = second + "秒";
|
|
|
- if (minute > 0) str = minute + "分" + str;
|
|
|
+ string str = second + secondsUnit;//"秒";
|
|
|
+ if (minute > 0) str = minute + minutesUnit + str; //"分"
|
|
|
return str;
|
|
|
}
|
|
|
}
|