Prechádzať zdrojové kódy

修改了倒计时的显示逻辑

WGL 2 mesiacov pred
rodič
commit
f9c1e3646a

+ 3 - 2
ActionTowerDefense/Assets/Scripts/GameManager.cs

@@ -91,8 +91,9 @@ public class GameManager : MonoBehaviour
             gameTime += Time.deltaTime;
             totalGameTime += Time.deltaTime;
             EnemyCreater.instance.OnGameTimeChange(gameTime);
-            int timeText = (int)totalGameTime;
-            text.text = $"{timeText / 60:D2}:{timeText % 60:D2}({timeText}s)";
+            int timeText = (int)gameTime;
+            //text.text = $"{timeText / 60:D2}:{timeText % 60:D2}({timeText}s)";
+            text.text = $"{timeText}";
         }
     }