Pārlūkot izejas kodu

修改了倒计时的显示逻辑

WGL 2 mēneši atpakaļ
vecāks
revīzija
f9c1e3646a
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      ActionTowerDefense/Assets/Scripts/GameManager.cs

+ 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}";
         }
     }