public override void LoadSceneBegin(game_LoadSceneInfo _data) { Trace.Log("Load Scene Begin:" + _data.strSceneName); SceneManager.RegisterSceneProgressEvent(LoadingScene); SceneManager.RegisterSceneLoadStartEvent(SceneLoadStart); if (SceneManager.Instance.IsLoaded(_data.strSceneName)) { ViewEventHelper.Instance.SendCommand((GameLogic.GameLogicDef)_data.nCmdID); //LoadingWindow.LeaveMovie(); //GameContextManager.UCommonService.SetFullScreenState(EViewState.EVS_Pop, 0); UFullScreenStateData data = new UFullScreenStateData(_bShow: false); UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_FULLSCREEN_CHANGEIMAGE, data); } else { Vector3 BornVector = new Vector3(); BornVector.x = _data.fBornPosX; BornVector.y = _data.fBornPosY; BornVector.z = _data.fBornPosZ; SceneManager.Instance.LoadScene(_data.strSceneName, _data.nMapID, BornVector); } //SceneManager.SceneTransitionStart += MatchScsenTranstitionStart; //SceneManager.SceneTransitionFinish += MatchScsenTranstitionFinish; curLoadSceneInfo = _data; UISystem.Instance.MatchWnd(); }
public override void OnMessage(WndMsgID msgID, UIMsgData data) { if (m_wndView == null) { return; } switch (msgID) { case WndMsgID.WND_MSG_COMMOM_LOADSCENESTATE_ENTER: { if (m_bForceConditionHide) { return; } SetVisible(true); if (m_wndView != null) { m_wndView.OnWndOpen(); } } break; case WndMsgID.WND_MSG_COMMON_LOGINSTATE_ENTER: { SetVisible(true); //m_wndView.ChangeFullScreenSprite(1); m_wndView.OpenFullScreenMovie(); } break; case WndMsgID.WND_MSG_COMMON_LOGINSTATE_LEAVE: { m_wndView.CloseFullScreenMovie(); SetVisible(false); } break; case WndMsgID.WND_MSG_CREATEHERO_FALLBACK: { m_wndView.OpenFullScreenMovie(); //m_wndView.ChangeFullScreenSprite(1); SetVisible(true); } break; case WndMsgID.WND_MSG_COMMON_CHOOSESTATE_ENTER: { m_wndView.ChangeFullScreenSprite(0); SetVisible(true); } break; case WndMsgID.WND_MSG_COMMOM_STATICGAMESTATE_ENTER: case WndMsgID.WND_MSG_COMMOM_LOADSCENESTATE_LEAVE: { SetVisible(false); if (m_wndView != null) { m_wndView.OnWndClose(); } } break; case WndMsgID.WND_MSG_FULLSCREEN_CHANGEIMAGE: { UFullScreenStateData ViewData = data as UFullScreenStateData; m_wndView.ChangeFullScreenSprite(ViewData.FullScreenImageID); SetVisible(ViewData.bFullScreenShow); } break; case WndMsgID.WND_MSG_GAMEWAITINGROOMVISILBLE: { SetForceConditionHide(data as FullViewForceConditionHide); } break; } }