Question by
amirShiraz · Aug 09, 2019 at 07:53 PM ·
2d3doptimizationupdate functionfor loop
loop inside update
hello there! i want to put a for loop indise the Update() so this code will be written once
GameController.Controller.timers = 18 and maby i will add more in future
for (int i = 0; i < GameController.Controller.timers.Length; i++)
{
if (GameController.Controller.timers[i].isFinished)
text[i].text = "Done!";
else
text[i].text = GameController.Controller.timers[i].hour.ToString("00") + GameController.Controller.timers[i].min.ToString(":00") + GameController.Controller.timers[i].sec.ToString(":00");
will it "stuck" the game? there is a better way to do it?
Comment