예제 #1
0
 public void BackToPauseMenu()
 {
     backgroundMark.FadeOut(0.1f);
     background.FadeOut(0.2f, 0.1f);
     MenuController.currentMenu = instance;
     LastPressed.SetPressed(false);
 }
예제 #2
0
    protected override void Update()
    {
        if (!IsCurrentActive())
        {
            return;
        }

        base.Update();

        if (STBInput.GetButtonDown("Cancel"))
        {
            SoundManager.instance.PlayUiEfx(UiEfx.CANCEL);
            if (LastPressed == null)
            {
                MenuController.instance.BackToMainMenu(true);
            }
            else
            {
                LastPressed.SetPressed(false);
            }
        }
    }
예제 #3
0
    protected override void Update()
    {
        if (!IsCurrentActive())
        {
            return;
        }

        base.Update();

        if (STBInput.GetButtonDown("Cancel"))
        {
            SoundManager.instance.PlayUiEfx(UiEfx.CANCEL);
            if (LastPressed == null)
            {
                FadeOut(0.4f);
                EventSystem.current.SetSelectedGameObject(null);
            }
            else
            {
                LastPressed.SetPressed(false);
            }
        }
    }
예제 #4
0
    protected override void Update()
    {
        if (!IsCurrentActive())
        {
            return;
        }

        base.Update();

        if (STBInput.GetButtonDown("Cancel"))
        {
            SoundManager.instance.PlayUiEfx(UiEfx.CANCEL);
            if (LastPressed == null)
            {
                MenuController.instance.BackToOptionsMenu();
                EventSystem.current.SetSelectedGameObject(null);
            }
            else
            {
                LastPressed.SetPressed(false);
                EventSystem.current.SetSelectedGameObject(LastFocused.gameObject);
            }
        }
    }