Пример #1
0
    IEnumerator ReadyTimer()
    {
        shootingState = InterceptorShootingStates.READY;
        yield return(new WaitForSeconds(readyCoolDown));

        shootingState = InterceptorShootingStates.LAUNCH;
    }
Пример #2
0
 void Setup()
 {
     setupPositions = new Vector3[pooledObjects.Count];
     for (int i = 0; i < setupPositions.Length; i++)
     {
         setupPositions[i] = Vector3.Scale(Random.insideUnitSphere.normalized, setupScale);
     }
     shootingState = InterceptorShootingStates.AIM;
 }
Пример #3
0
    void Launch()
    {
        int deadCounter = 0;

        for (int i = 0; i < pooledObjects.Count; i++)
        {
            pooledObjects[i].Update();
            if (!pooledObjects[i].Active)
            {
                deadCounter++;
            }
        }
        if (deadCounter >= pooledObjects.Count)
        {
            shootingState = InterceptorShootingStates.SETUP;
        }
    }