Пример #1
0
 public void NewGame()
 {
     _audio_source.volume = 0.6f * OptionsManager.GetSoundVolume();
     _audio_source.PlayOneShot(ClickSFX);
     StartMenu.FadeOut(1);
     DifficultyMenu.FadeIn(1, 1);
 }
Пример #2
0
    public void SelectDifficulty(int difficulty) //int because the editer can't serialize enums for button events
    {
        MonsterSpawner.DifficultyEnum difficultyEnum;
        switch (difficulty)
        {
        case 0: difficultyEnum = MonsterSpawner.DifficultyEnum.Easy;
            break;

        case 1: difficultyEnum = MonsterSpawner.DifficultyEnum.Normal;
            break;

        case 2: difficultyEnum = MonsterSpawner.DifficultyEnum.Hard;
            break;

        default: difficultyEnum = MonsterSpawner.DifficultyEnum.Hard;
            break;
        }

        if (_monster_spawner != null)
        {
            _monster_spawner.Difficulty = difficultyEnum;
        }
        else
        {
            Debug.Log("MonsterSpawner not found (StartMenuManager)");
        }

        StartCoroutine(EnableTutorial(21f)); //21 = length of tutorial transition
        DifficultyMenu.FadeOut(2);
        _audio_source.volume = 0.6f * OptionsManager.GetSoundVolume();
        _audio_source.PlayOneShot(ClickSFX);
        StartCoroutine(DisableTutorial());  //Destroys tutorial objects once the game starts
        StartCoroutine(DisplayStory(2, 2)); //Displays story text
        StartCoroutine(EnablePauseMenu(21f));
    }
Пример #3
0
 public void FadeOutOptionsMenu(float time)
 {
     _fadable.FadeOut(time);
     _back_menu.FadeIn(time, time);
 }
 public void FadeInOptionsMenu()
 {
     _fadable.FadeOut(1);
     OptionsMenu.FadeInOptionsMenu(1, 1, _fadable);
 }