From 40b852eca6c2fdbe777ee75361593d71825c1ac2 Mon Sep 17 00:00:00 2001 From: Philip White Date: Wed, 3 Nov 2021 23:26:19 +0000 Subject: [PATCH] Update Optimized Pastie Timer Script --- .../Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs b/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs index fc9c43d..b02378e 100644 --- a/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs +++ b/Unity-Files/Assets/Scripts/Gameplay/TimedSelfDestructWithTimerOrShootToReturn.cs @@ -19,7 +19,7 @@ public class TimedSelfDestructWithTimerOrShootToReturn : MonoBehaviour if (timeToDestruction > 0) { timeToDestruction -= Time.deltaTime; - GetComponentInChildren().text = timeToDestruction.ToString().Split('.')[0]; + GetComponentInChildren().text = Mathf.FloorToInt(timeToDestruction).ToString(); } else {