Exemplo n.º 1
0
 public void ShowMenu(MenuShowing show, float fadeTime = 0.0f)
 {
     if (menuShowing == show)
     {
         return;
     }
     menuShowing = show;
     m_MenuFader.MoveTo(show != MenuShowing.None ? 1.0f : 0.0f, fadeTime);
     if (menuShowing != MenuShowing.None)
     {
         Game.SoundSystem.Play(uiSelectLightSound);
     }
     else
     {
         Game.SoundSystem.Play(uiCloseSound);
     }
 }
Exemplo n.º 2
0
    public void ShowMenu(MenuShowing show, float fadeTime = 0.0f)
    {
        if (menuShowing == show)
        {
            return;
        }
        if (show == MenuShowing.Main && menuShowing == MenuShowing.Raider)
        {
            mainMenu.ShowSubMenu(mainMenu.uiBinding.menus[0], true);
        }
        menuShowing = show;
        m_MenuFader.MoveTo((show != MenuShowing.None || show != MenuShowing.Raider) ? 1.0f : 0.0f, fadeTime);
        if (menuShowing != MenuShowing.None)
        {
            Game.SoundSystem.Play(uiSelectLightSound);
        }
        else
        {
            Game.SoundSystem.Play(uiCloseSound);
        }

        //FadeMenu
        //if (mainMenu != null)
        //{
        //    if (!mainMenu.faded)
        //    {
        //        switch (show)
        //        {
        //            case MenuShowing.None:
        //                mainMenu.FadeMainMenu(true);
        //                break;
        //            case MenuShowing.Main:
        //                mainMenu.FadeMainMenu(false);
        //                break;
        //            case MenuShowing.Ingame:
        //                mainMenu.FadeMainMenu(false);
        //                break;
        //            case MenuShowing.Raider:
        //                mainMenu.FadeMainMenu(true);
        //                break;
        //            default:
        //                break;
        //        }
        //    }
        //}
    }
Exemplo n.º 3
0
 public void ShowMenu(MenuShowing show, float fadeTime = 0.0f)
 {
     if (menuShowing == show)
     {
         return;
     }
     menuShowing = show;
     m_MenuFader.MoveTo(show != MenuShowing.None ? 1.0f : 0.0f, fadeTime);
     if (menuShowing != MenuShowing.None)
     {
         //Game.SoundSystem.Play(uiSelectLightSound);
         FMODUnity.RuntimeManager.PlayOneShot(playerAudio.Menu_SelectLight);
     }
     else
     {
         //Game.SoundSystem.Play(uiCloseSound);
         FMODUnity.RuntimeManager.PlayOneShot(playerAudio.Menu_Close);
     }
 }