Ejemplo n.º 1
0
    override public void OnDestroy()
    {
        HallWin            = null;
        CreatingRoomWin    = null;
        WaitingRoomWin     = null;
        HighLadder         = null;
        this.SummonerFrame = null;
        CurHallWinState    = EHallWinState.EHWS_None;
        bCreateAllHallWin  = false;


        base.OnDestroy();
    }
Ejemplo n.º 2
0
 public bool SetState(EHallWinState nState)
 {
     if (nState == CurHallWinState)
     {
         return(false);
     }
     Trace.Log("MMOHudState old:" + CurHallWinState);
     onExit(CurHallWinState);
     CurHallWinState = nState;
     onEnter(CurHallWinState);
     Trace.Log("MMOHudState new:" + CurHallWinState);
     return(true);
 }
Ejemplo n.º 3
0
    private void onExit(EHallWinState nState)
    {
        switch (nState)
        {
        case EHallWinState.EHWS_None:

            break;

        case EHallWinState.EHWS_Hall:
        {
            if (SFGFxMovieManager.CheckTheMovieCanUse(HallWin))
            {
                HallWin.LeaveMovie();
            }
        }
        break;

        case EHallWinState.EHWS_Waiting:
        {
            if (SFGFxMovieManager.CheckTheMovieCanUse(WaitingRoomWin))
            {
                WaitingRoomWin.LeaveMovie();
            }
        }
        break;

        case EHallWinState.EHWS_Creating:
        {
            if (SFGFxMovieManager.CheckTheMovieCanUse(CreatingRoomWin))
            {
                CreatingRoomWin.LeaveMovie();
            }
        }
        break;

        case EHallWinState.EHWS_Summoner:
        {
            CurHallWin = SummonerFrame;
            if (SFGFxMovieManager.CheckTheMovieCanUse(SummonerFrame))
            {
                SummonerFrame.LeaveMovie();
            }
        }
        break;
        }
    }
Ejemplo n.º 4
0
    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);
        }
    }