Пример #1
0
    IEnumerator IncreaseNbBattery()
    {
        isWaiting = true;

        if ((nbBattery) < 5)
        {
            nbBattery++;
            hangar.spawnBattery();
        }

        yield return(new WaitForSeconds(timeToWait));

        isWaiting = false;
    }