Exemple #1
0
    private static void OnBack(object o)
    {
        if (CurrentView == null)
        {
            return;
        }
        if (CurrentView.GetType() == typeof(UIMainView))
        {
            return;
        }

        var prevViewType = PrevViewTypes[PrevViewTypes.Count - 1];

        if (_inClose)
        {
            return;
        }

        CurrentView.Close(() =>
        {
            if (prevViewType == typeof(UIMainView))
            {
                UIMainView.Show(false);
            }
            else
            {
                UiManager.ShowUIFromBack(prevViewType, null);
            }
            PrevViewTypes.Remove(prevViewType);
            _inClose = false;
        });
        _inClose = true;
        Sound.PlayUiAudioOneShot(1003);
    }
Exemple #2
0
    private static IEnumerator ShowTitleImpl()
    {
        //加载Loading
        yield return(ShowLoading());

        //卸载场景
        yield return(StageBase.UnloadCurrentScene());

        yield return(Yielders.Frame);


        //显示主界面
        UIMainView.Show(true);

        yield return(new WaitForSeconds(0.2f));

        //关闭loading
        yield return(HideLoading());
    }