示例#1
0
    static bool OpenMenu(E_MenuState state)
    {
        if (CanChangeToState(state) == false)
        {
            return(false);
        }

        GuiMenu menu = m_Instance.SetState(state);

        if (menu == null)
        {
            return(false);
        }

        m_Instance.UpdateHudVisibility(false);

        if (menu.IsInitialized == false)
        {
            menu.InitMenu(m_Instance);
        }

        menu.ShowMenu();

        return(true);
    }
示例#2
0
    IEnumerator StartSinglePlayerSubMenu()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        AudioSource.PlayClipAtPoint(SoundMainMenuOut, Position);

        MainBackground.GetComponent <Animation>().Play("toSubmenu");
        MainLine.GetComponent <Animation>().Play("ButtonLineOut");
        SinglePlayer.GetComponent <Animation>().Play("MainButtonsOut");
        Dojo.GetComponent <Animation>().Play("MainButtonsOut");
        Chapters.GetComponent <Animation>().Play("MainButtonsOut");
        Help.GetComponent <Animation>().Play("MainButtonsOut");
        MoreGames.GetComponent <Animation>().Play("MainButtonsOut");
        GameCenter.GetComponent <Animation>().Play("MainButtonsOut");

        yield return(new WaitForSeconds(0.3f));

        GameBackground.GetComponent <Animation>().Play("in");
        GameTitle.GetComponent <Animation>().Play("TitleIn");

        if (Game.Instance.IsResumePossible(E_GameType.SinglePlayer))
        {
            GameResume.GetComponent <Animation>().Play("in");
        }

        GameEasy.GetComponent <Animation>().Play("in");
        GameNormal.GetComponent <Animation>().Play("in");
        GameHard.GetComponent <Animation>().Play("in");
        Back.GetComponent <Animation>().Play("in");

        AudioSource.PlayClipAtPoint(SoundSubMenuIn, Position);

        MenuState = E_MenuState.GameSubmenu;
    }
示例#3
0
    IEnumerator StartFromDojo2MainMenu()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        AudioSource.PlayClipAtPoint(SoundSubMenuOut, Position);

        DojoBackground.GetComponent <Animation>().Play("out");
        DojoTitle.GetComponent <Animation>().Play("TitleOut");

        if (Game.Instance.IsResumePossible(E_GameType.Survival))
        {
            DojoResume.GetComponent <Animation>().Play("out");
        }
        DojoNew.GetComponent <Animation>().Play("out");
        Back.GetComponent <Animation>().Play("out");

        yield return(new WaitForSeconds(0.3f));

        AudioSource.PlayClipAtPoint(SoundMainMenuIn, Position);

        MainBackground.GetComponent <Animation>().Play("toMainMenu");
        MainLine.GetComponent <Animation>().Play("ButtonLineIn");
        SinglePlayer.GetComponent <Animation>().Play("MainButtonsIn");
        Dojo.GetComponent <Animation>().Play("MainButtonsIn");
        Chapters.GetComponent <Animation>().Play("MainButtonsIn");
        Help.GetComponent <Animation>().Play("MainButtonsIn");
        MoreGames.GetComponent <Animation>().Play("MainButtonsIn");
        GameCenter.GetComponent <Animation>().Play("MainButtonsIn");

        MenuState = E_MenuState.MainMenu;
    }
示例#4
0
    IEnumerator StartFromChapters2MainMenu()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        AudioSource.PlayClipAtPoint(SoundSubMenuOut, Position);

        ChaptersLocked.GetComponent <Animation>().Play("out");
        ChaptersBackground.GetComponent <Animation>().Play("out");
        ChaptersTitle.GetComponent <Animation>().Play("TitleOut");

        int unlockedMissions = Game.Instance.GetUnlockedMission();

        for (int i = 0; i < Chapter.Length && i < unlockedMissions; i++)
        {
            Chapter[i].GetComponent <Animation>().Play("out");
        }

        Back.GetComponent <Animation>().Play("out");

        yield return(new WaitForSeconds(0.1f));

        AudioSource.PlayClipAtPoint(SoundMainMenuIn, Position);

        MainBackground.GetComponent <Animation>().Play("toMainMenu");
        MainLine.GetComponent <Animation>().Play("ButtonLineIn");
        SinglePlayer.GetComponent <Animation>().Play("MainButtonsIn");
        Dojo.GetComponent <Animation>().Play("MainButtonsIn");
        Chapters.GetComponent <Animation>().Play("MainButtonsIn");
        Help.GetComponent <Animation>().Play("MainButtonsIn");
        MoreGames.GetComponent <Animation>().Play("MainButtonsIn");
        GameCenter.GetComponent <Animation>().Play("MainButtonsIn");

        MenuState = E_MenuState.MainMenu;
    }
示例#5
0
    // PRIVATE METHODS

    static GuiMenu PrepareMenu(E_MenuState state)
    {
        if (m_Instance == null)
        {
            return(null);
        }

        return(m_Instance.SetState(state));
    }
示例#6
0
    IEnumerator StartLeaderboards()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.2f));

        yield return(new WaitForSeconds(0.2f));

        MenuState = E_MenuState.MainMenu;
    }
示例#7
0
    IEnumerator StartAchievements()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.2f));

        yield return(new WaitForSeconds(0.2f));

        MenuState = E_MenuState.MainMenu;
    }
示例#8
0
    IEnumerator StartNewDojo()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        StartCoroutine(FadeInLoading());
        yield return(new WaitForSeconds(0.3f));

        Game.Instance.StartSurvivalMode();
    }
示例#9
0
    IEnumerator StartGameCenter()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.2f));

        openFeint.OpenDashboard();
        yield return(new WaitForSeconds(0.2f));

        MenuState = E_MenuState.MainMenu;
    }
示例#10
0
    IEnumerator StartChapter(int index)
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        FadeOutMusic(4);
        StartCoroutine(FadeInLoading());
        yield return(new WaitForSeconds(0.3f));

        Game.Instance.StartChapterMode(index);
    }
示例#11
0
    IEnumerator StartNewNormalGame()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        StartCoroutine(FadeOutMusic(4));
        StartCoroutine(FadeInLoading());
        yield return(new WaitForSeconds(0.3f));

        Game.Instance.StartNewGame(E_GameDifficulty.Normal);
    }
示例#12
0
    static bool GoFromCustomToIdleState(E_MenuState state)
    {
        if (m_Instance == null)
        {
            return(false);
        }

        if (m_Instance.IsInState(state) == false)
        {
            return(false);
        }

        return(GotoIdleState());
    }
示例#13
0
    IEnumerator StartTutorial()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        StartCoroutine(FadeOutMusic(4));
        StartCoroutine(FadeInLoading());

        yield return(new WaitForSeconds(0.3f));

        Game.Instance.StartTutorial();

        MenuState = E_MenuState.MainMenu;
    }
示例#14
0
    IEnumerator _ShowGameCenter()
    {
        MenuState = E_MenuState.Busy;

        ALBackground.GetComponent <Animation>().Play("AandL_out");
        Achievements.GetComponent <Animation>().Play("AandL_out");
        Leaderboards.GetComponent <Animation>().Play("AandL_out");

        yield return(new WaitForSeconds(0.2f));

        ALBackground.GetComponent <Animation>().Play("AandL_in");
        GameCenter.GetComponent <Animation>().Play("AandL_in");

        MenuState = E_MenuState.MainMenu;
    }
示例#15
0
    // PRIVATE METHODS

    static bool CanChangeToState(E_MenuState state)
    {
        if (m_Instance == null)
        {
            return(false);
        }
        if (m_Instance.IsInState(E_MenuState.Exiting) == true)
        {
            return(false);
        }
        if (m_Instance.IsInState(state) == true)
        {
            return(false);
        }
        return(true);
    }
示例#16
0
    static bool CloseMenu(E_MenuState state)
    {
        if (m_Instance == null)
        {
            return(false);
        }

        if (m_Instance.IsInState(state) == false)
        {
            return(false);
        }

        m_Instance.SetState(E_MenuState.Idle);

        return(true);
    }
示例#17
0
    IEnumerator StartMoreGamesSubMenu()
    {
        MenuState = E_MenuState.Busy;
        yield return(new WaitForSeconds(0.1f));

        StartCoroutine(FadeOutMusic(4));
//        StartCoroutine(FadeInLoading());

        yield return(new WaitForSeconds(0.3f));

        Application.Quit();

        /*
         * Game.Instance.StartSaleScreens();
         *
         * MenuState = E_MenuState.MainMenu;*/
    }
示例#18
0
    static bool OpenMenu(E_MenuState state)
    {
        GuiMenu menu = PrepareMenu(state);

        if (menu == null)
        {
            return(false);
        }

        if (menu.IsInitialized == false)
        {
            menu.InitMenu(m_Instance);
        }

        menu.ShowMenu();

        return(true);
    }
示例#19
0
    // PRIVATE METHODS

    void SetMenuState(E_MenuState state)
    {
        if (m_MenuState == state)
        {
            return;
        }
        m_MenuState = state;

        switch (m_MenuState)
        {
        case E_MenuState.Idle:
            break;

        case E_MenuState.Menu:
            break;

        default:
            break;
        }
    }
示例#20
0
 void FadeIn()
 {
     MenuState = E_MenuState.MainMenu;
 }