Exemplo n.º 1
0
    private IEnumerator HandleSequence()
    {
        while (Active)
        {
            yield return(new WaitForSeconds(_intervalInSeconds));

            var randomIndex = Random.Range(0, 2);
            _boss.CurrentPhase = (BossPhase)Enum.GetValues(typeof(BossPhase)).GetValue(randomIndex);

            _boss.BeginCasting();
        }
    }