Update Optimized Pastie Timer Script

This commit is contained in:
Philip W 2021-11-03 23:26:19 +00:00
parent 116168ab90
commit 40b852eca6

View File

@ -19,7 +19,7 @@ public class TimedSelfDestructWithTimerOrShootToReturn : MonoBehaviour
if (timeToDestruction > 0) if (timeToDestruction > 0)
{ {
timeToDestruction -= Time.deltaTime; timeToDestruction -= Time.deltaTime;
GetComponentInChildren<TextMesh>().text = timeToDestruction.ToString().Split('.')[0]; GetComponentInChildren<TextMesh>().text = Mathf.FloorToInt(timeToDestruction).ToString();
} }
else else
{ {