Пример #1
0
    void GodsHaveChosenOpponent() // this is raised in the choose modifier scene
    {
        switch (runtimeChoices.runTimeLoopCount)
        {
        case 1:
            runtimeChoices.firstOpponent.modifier = finalChoice;
            break;

        case 2:
            runtimeChoices.secondOpponent.modifier = finalChoice;
            break;

        case 3:
            runtimeChoices.thirdOpponent.modifier = finalChoice;
            break;

        case 4:
            runtimeChoices.fourthOpponent.modifier = finalChoice;
            break;
        }
        //  Debug.Log("Gods have chosen the " + runtimeChoices.runTimeLoopCount + ". modifier! It is: " + finalChoice.name);
        if (_musicManager != null)
        {
            _musicManager.PlayMusic("Battle", 1);
        }
        runtimeChoices.enemyModifiers.Add(enemyModifierChoices[choice - 1]); // adds the chosen modifier to the array
        audioList = FindObjectOfType <AudioList>();
        audioList.OnModifierPicked();
        StartCoroutine(WaitForModifierToShutUp());
    }