|
|
@@ -19,6 +19,13 @@ public class GameTimeCounterSA : MonoBehaviour
|
|
|
|
|
|
void Update()
|
|
|
{
|
|
|
+ //投币测试
|
|
|
+ if (Input.GetKeyDown(KeyCode.Alpha7) || Input.GetKeyDown(KeyCode.Alpha8))
|
|
|
+ {
|
|
|
+ //投币接口测试
|
|
|
+ StandaloneAPI.InsertCoinForAddTime();
|
|
|
+ }
|
|
|
+
|
|
|
StandaloneAPI.DoGameTimeCountDown();
|
|
|
playTimeText.text = string.Format("剩余时间{0}", GetTimeStr());
|
|
|
if (StandaloneAPI.GetGameTimeCountDown() > 0)
|
|
|
@@ -44,13 +51,9 @@ public class GameTimeCounterSA : MonoBehaviour
|
|
|
payTimeCountDownText.text = string.Format("投币继续游戏\n{0}S", t / 1000);
|
|
|
if (t == 0) StandaloneAPI.ForceBackHome();
|
|
|
}
|
|
|
- #if UNITY_EDITOR
|
|
|
- if (Input.GetKeyDown(KeyCode.Z))
|
|
|
- {
|
|
|
- //投币接口测试
|
|
|
- StandaloneAPI.InsertCoinForAddTime();
|
|
|
- }
|
|
|
- #endif
|
|
|
+ //#if UNITY_EDITOR
|
|
|
+
|
|
|
+ //#endif
|
|
|
}
|
|
|
|
|
|
string GetTimeStr()
|