Пример #1
0
    private void Update()
    {
        if (!playerCharacter || playerCharacter.IsDead)
        {
            return;
        }


        if (currentRoutine == null)
        {
            currentRoutine = enemySpawnRoutines[Random.Range(0, enemySpawnRoutines.Length)];
            currentRoutine.Start();
        }
        else
        {
            currentRoutine.Update();

            if (currentRoutine.IsComplete)
            {
                currentRoutine = null;
            }
        }
    }
Пример #2
0
 public void Initialize(EnemySpawnRoutine routine)
 {
     parentRoutine = routine;
 }