protected IEnumerator LaunchAttack(float delay) { spawn += 1; yield return(Gm.WaitFor(delay)); if (IsInvisible) { spawn -= 1; yield break; } Spawn(3, 1); }
protected IEnumerator chooseAttack(float delay) { yield return(Gm.WaitFor(delay)); while (true) { foreach (BlackPawnMinon m in minions) { if (m.Position.y < Position.y) { m.launchAttack(); yield break; } } yield return(Gm.WaitFor(0.2f)); } }
protected IEnumerator Wait() { foreach (GameObject b in ButtonsEnemy) { b.SetActive(false); } EnemyLifeObj.SetActive(false); Rend.enabled = false; float spd = Speed; Speed = 0; yield return(Gm.WaitFor(1.0f)); Speed = spd; foreach (GameObject b in ButtonsEnemy) { b.SetActive(true); } EnemyLifeObj.SetActive(true); Rend.enabled = true; }