Exemplo n.º 1
0
        public void OnEvent(CEvent evt)
        {
            switch (evt.GetEventId())
            {
            case EGameEvent.eGameEvent_Loading:
            {
                GameStateType stateType = (GameStateType)evt.GetParam("NextState");
                LoadingState  lState    = GameStateManager.Instance.getState(GameStateType.GS_Loading) as LoadingState;
                lState.SetNextState(stateType);
                lState.SetFrontScenes(View.EScenesType.EST_Play);
                SetStateTo(GameStateType.GS_Loading);
            }
            break;

            case EGameEvent.eGameEvent_IntoRoom:
            {
                LoadingState lState = GameStateManager.Instance.getState(GameStateType.GS_Loading) as LoadingState;
                lState.SetNextState(GameStateType.GS_Room);
                lState.SetFrontScenes(View.EScenesType.EST_Play);
                SetStateTo(GameStateType.GS_Loading);
            }
            break;

            case EGameEvent.eGameEvent_IntoLobby:
            {
                LoadingState lState = GameStateManager.Instance.getState(GameStateType.GS_Loading) as LoadingState;
                lState.SetNextState(GameStateType.GS_Lobby);
                lState.SetFrontScenes(View.EScenesType.EST_Play);
                SetStateTo(GameStateType.GS_Loading);
            }
            break;
            }
        }
Exemplo n.º 2
0
 public void OnEvent(CEvent evt)
 {
     switch (evt.GetEventId())
     {
     case EGameEvent.eGameEvent_IntoLobby:
         GameStateManager.Instance.ChangeGameStateTo(GameStateType.GS_Lobby);
         break;
     }
 }
Exemplo n.º 3
0
 void OnEvent(CEvent eve)
 {
     switch (eve.GetEventId())
     {
     case EGameEvent.eGameEvent_SSPingInfo:
         float ping = (float)eve.GetParam("ping");
         ShowPingIcon(ping);
         break;
     }
 }
Exemplo n.º 4
0
        public void OnEvent(CEvent evt)
        {
            switch (evt.GetEventId())
            {
            case EGameEvent.eGameEvent_RoomBack:
                SetStateTo(GameStateType.GS_Lobby);
                break;

            case EGameEvent.eGameEvent_IntoHero:
                SetStateTo(GameStateType.GS_Hero);
                break;
            }
        }
Exemplo n.º 5
0
        public void OnEvent(CEvent evt)
        {
            UIPlayMovie.PlayMovie("cg.mp4", Color.black, 2 /* FullScreenMovieControlMode.Hidden*/, 3 /*FullScreenMovieScalingMode.Fill*/);
            switch (evt.GetEventId())
            {
            case EGameEvent.eGameEvent_InputUserData:
                SetStateTo(GameStateType.GS_User);
                break;

            case EGameEvent.eGameEvent_IntoLobby:
                GameStateManager.Instance.ChangeGameStateTo(GameStateType.GS_Lobby);
                break;
            }
        }
 private void OnEvent(CEvent evt)
 {
     switch (evt.GetEventId())
     {
     case EGameEvent.eGameEvent_Loading:
     {
         GameStateType stateType = (GameStateType)evt.GetParam("NextState");
         if (stateType != GameStateType.GS_Play)
         {
             return;
         }
         timeStart = Time.time;
         tagCheck  = true;
     }
     break;
     }
 }
Exemplo n.º 7
0
 static public void SendEvent(CEvent evt)
 {
     Broadcast <CEvent>(evt.GetEventId(), evt);
 }
Exemplo n.º 8
0
 static public void SendEvent <T, U, V>(CEvent evt, T arg2, U arg3, V arg4)
 {
     Broadcast <CEvent, T, U, V>(evt.GetEventId(), evt, arg2, arg3, arg4);
 }
Exemplo n.º 9
0
 static public void SendEvent <T>(CEvent evt, T arg2)
 {
     Broadcast <CEvent, T>(evt.GetEventId(), evt, arg2);
 }