private void onEnter(ESummonerState nState) { switch (nState) { case ESummonerState.ESS_TalentPage: { CurSummonerFrame = TalentPage; if (SFGFxMovieManager.CheckTheMovieCanUse(TalentPage)) { TalentPage.EnterMovie(); // ShowSummonerFrame(true); } } break; default: { break; } } if (CurSummonerFrame != null) { CurSummonerFrame.SetDepth((int)SFGFxMovieManager.EGFxMovieLayer.EGFxLayer_PopupLayer + 1); } }
public void InsertMovie(SFMovieEx _insertSource, SFMovieEx _insertTarget) { if (IsMovieAllowed(_insertTarget)) { int sourceIndex = PopupMovieStack.IndexOf(_insertSource); int targetIndex = PopupMovieStack.IndexOf(_insertTarget); int tmpDepth = _insertSource.Depth; _insertSource.SetDepth(_insertTarget.Depth); _insertTarget.SetDepth(tmpDepth); PopupMovieStack[sourceIndex] = _insertTarget; PopupMovieStack[targetIndex] = _insertSource; } else { PushMovie(_insertTarget); } }
public void PushMovie(SFMovieEx _targetMovie) { if (_targetMovie == null) { return; } if (!IsMovieAllowed(_targetMovie)) { _targetMovie.EnterMovie(); PopupMovieStack.Add(_targetMovie); } int nNewDepth = (int)(SFGFxMovieManager.EGFxMovieLayer.EGFxLayer_PopupLayer) + PopupMovieStack.Count + 1; if (_targetMovie.Depth != nNewDepth) { _targetMovie.SetDepth(nNewDepth); } }
/// <summary> /// 移除movie /// </summary> /// <param name="_targetMovie">指定要移除的mv,如果为null则移除栈顶的mv</param> /// <returns>返回当前要移出栈的mv</returns> public SFMovieEx PopMovie(SFMovieEx _targetMovie = null) { if (PopupMovieStack.Count < 0) { return(null); } SFMovieEx popMV = null; if (_targetMovie == null) { popMV = PopupMovieStack[PopupMovieStack.Count - 1]; } else { if (!PopupMovieStack.Contains(_targetMovie)) { return(null); } int nTargetIndex = PopupMovieStack.IndexOf(_targetMovie); popMV = PopupMovieStack[nTargetIndex]; } if (popMV == null) { return(null); } popMV.LeaveMovie(); int nNewDepth = (int)(SFGFxMovieManager.EGFxMovieLayer.EGFxLayer_Default); if (popMV.Depth != nNewDepth) { popMV.SetDepth(nNewDepth); } PopupMovieStack.Remove(popMV); return(popMV); }
private void onEnter(EHallWinState nState) { switch (nState) { case EHallWinState.EHWS_None: { if (CurHallWin != null) { CurHallWin.SetMovieVisible(false); if (CurHallWin == WaitingRoomWin) { ViewEventHelper.Instance.SendCommand(GameLogicDef.GVIEWCMD_MATCH_ROOM_PLAYER_EXIT); } else { ViewEventHelper.Instance.SendCommand(GameLogicDef.GVIEWCMD_MATCH_EXIT_HALL); } UISystem.Instance.ShowWnd(WndID.WND_ID_PLAYERBUTTONFRAME, true); CurHallWin = null; } } break; case EHallWinState.EHWS_Hall: { CurHallWin = HallWin; if (SFGFxMovieManager.CheckTheMovieCanUse(HallWin)) { HallWin.EnterMovie(); } } break; case EHallWinState.EHWS_Waiting: { CurHallWin = WaitingRoomWin; if (SFGFxMovieManager.CheckTheMovieCanUse(WaitingRoomWin)) { WaitingRoomWin.EnterMovie(); } } break; case EHallWinState.EHWS_Creating: { CurHallWin = CreatingRoomWin; if (SFGFxMovieManager.CheckTheMovieCanUse(CreatingRoomWin)) { CreatingRoomWin.EnterMovie(); } } break; case EHallWinState.EHWS_HighLadder: { CurHallWin = HighLadder; if (SFGFxMovieManager.CheckTheMovieCanUse(HighLadder)) { HighLadder.EnterMovie(); } } break; case EHallWinState.EHWS_Summoner: { CurHallWin = SummonerFrame; if (SFGFxMovieManager.CheckTheMovieCanUse(SummonerFrame)) { SummonerFrame.EnterMovie(); } } break; default: { break; } } if (CurHallWin != null) { CurHallWin.SetDepth((int)SFGFxMovieManager.EGFxMovieLayer.EGFxLayer_PopupLayer); } }