コード例 #1
0
    public void CloseOpenMenu(int panelIndex)
    {
        if (isTransitioning)
        {
            return;
        }

        isTransitioning = true;
        anim.SetBool("Close Menu", true);
        allowRuntimeUnpack = false;

        bool showMainMenu = false;

        if (panelIndex == 0 || panelIndex == 1)
        {
            if (gm.gameState == GameState.Menu)
            {
                panelIndex   = selectPhase;               //For Closing and Opening back to Song/Beatmap Select
                showMainMenu = true;
            }
            else
            {
                panelIndex = 5;              //Show Pause Screen Instead if Game State is not Menu
            }
        }

        OnTransitionEnd += () => ReopenPanel(panelIndex, showMainMenu);
    }
コード例 #2
0
 void CallOnTransitionEnd()
 {
     if (OnTransitionEnd != null)
     {
         OnTransitionEnd();
     }
     OnTransitionEnd = null;         //Clear all Functions Suscribed to Delegate
     isTransitioning = false;
 }
コード例 #3
0
 void CallOnTransitionStart()
 {
     //print("Transition Start Called on " + Time.time);
     if (OnTransitionStart != null)
     {
         OnTransitionStart();
     }
     OnTransitionStart = null;         //Clear all Functions Suscribed to Delegate
     anim.StopPlayback();
     isTransitioning = true;
 }
コード例 #4
0
 public void SuscribeToOnTransitionEvents(bool isStart, UITransitionDel function)
 {
     if (isStart)
     {
         OnTransitionStart += function;
     }
     else
     {
         OnTransitionEnd += function;
     }
 }
コード例 #5
0
    // Start is called before the first frame update
    void Start()
    {
        gm       = GameManager.inst;
        anim     = GetComponent <Animator>();
        songObjs = new List <BeatmapUIObj>();
        beatmaps = new List <BeatmapUIObj>();

        print(songObjs.Count);
        PopulateSongSelect();

        OnTransitionEnd += () =>
        {
            OnTransitionStart += () =>
            {
                allPanelGroups[7].buttonGroup.SetActive(true);
            };
        };

        sliders[0].value = PlayerPrefs.GetFloat("Master Volume", 1);
        sliders[1].value = PlayerPrefs.GetFloat("Music Volume", 1);
        sliders[2].value = PlayerPrefs.GetFloat("Sound Volume", 1);

        buttonSfxPlayer.ignoreListenerPause = true;
    }