Ejemplo n.º 1
0
    // 照相同时切换场景会崩溃
    void EnterLobby()
    {
        bool isEditor = false;

#if UNITY_EDITOR
        isEditor = true;
#endif
        if (isEditor)
        {
            CustomData.RoleInfo _Role = MLPlayerInfo.Instance.GetRoleInfo(rc.GetSelectedIndex()).mRoleInfo;
            if (!SystemSettingData.Instance.Tutorialed && _Role.name.Equals("tutorial"))
            {
                string msg = PELocalization.GetString(8000986) + "'?";
                MessageBox_N.ShowYNBox(msg, BtnYOnClick, BtnNoOnClick);
            }
            else
            {
                BtnNoOnClick();
            }
        }
        else
        {
            if (!SystemSettingData.Instance.Tutorialed)
            {
                string msg = PELocalization.GetString(8000986) + "'?";
                MessageBox_N.ShowYNBox(msg, BtnYOnClick, BtnNoOnClick);
            }
            else
            {
                BtnNoOnClick();
            }
        }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 进入教程接口
    /// </summary>
    /// <param name="role"></param>
    public void GotToTutorial(CustomData.RoleInfo role)
    {
        //lw:多人出教程后,进入lobby
        TutorialExit.type = Pathea.PeGameMgr.playerType == Pathea.PeGameMgr.EPlayerType.Multiple ?
                            TutorialExit.TutorialType.MultiLobby :TutorialExit.TutorialType.Story;

        SystemSettingData.Instance.Tutorialed = true;
        string nickname = role.name;

        CustomCharactor.CustomDataMgr.Instance.Current = role.CreateCustomData();
        CustomCharactor.CustomDataMgr.Instance.Current.charactorName = nickname;

        Pathea.PeGameMgr.playerType   = Pathea.PeGameMgr.EPlayerType.Tutorial;
        Pathea.PeGameMgr.sceneMode    = Pathea.PeGameMgr.ESceneMode.Tutorial;
        Pathea.PeGameMgr.tutorialMode = Pathea.PeGameMgr.ETutorialMode.DigBuild;

        Pathea.PeFlowMgr.Instance.LoadScene(Pathea.PeFlowMgr.EPeScene.GameScene);
    }