Преглед изворни кода

修改了倒计时的显示逻辑

WGL пре 2 месеци
родитељ
комит
f9c1e3646a
1 измењених фајлова са 3 додато и 2 уклоњено
  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}";
         }
     }