public void IgniteComp() { int tries = 0; while (tries < 4) { int randomNum = Random.Range(0, computers.Length); if (computers.Length != 0) { ComputerManager compCon = computers[randomNum].GetComponent <ComputerManager>(); if (compCon.GetFire() == false) { compCon.Ignite(); tries = 4; } } tries++; } }