Beispiel #1
0
    public IEnumerator ExecuteCombat()
    {
        defenseQueue.Clear();
        Animating = true;
        List <Animatable> deadOnes = new List <Animatable>();

        for (int i = 0; i < enemyLogics.Count; i++)
        {
            enemyLogics[i].EnterCombat();
        }
        while (animQueue.Length() > 0)
        {
            yield return(new WaitForSeconds(1));

            AnimationBean currentSet = animQueue.Next();
            if (currentSet.Win == WIN)
            {
                deadOnes.Add(currentSet.animatable);
            }
            else
            {
                deadOnes.Add(playerController);
            }
            RunAnimation(currentSet);
        }
        yield return(new WaitForSeconds(1.5f));

        AnimateDeaths(deadOnes);
        yield return(new WaitForSeconds(1));

        ExitCombat();
    }