public void OnEvent(FEvent evt) { switch ((GameEventEnum)evt.GetEventId()) { case GameEventEnum.Loading: { GameStateTypeEnum stateType = (GameStateTypeEnum)evt.GetParam("NextState"); LoadingState lState = GameStateManager.Instance.getState(GameStateTypeEnum.Loading) as LoadingState; lState.SetNextState(stateType); lState.SetFrontScenes(View.EScenesType.EST_Play); SetStateTo(GameStateTypeEnum.Loading); } break; case GameEventEnum.IntoRoom: { LoadingState lState = GameStateManager.Instance.getState(GameStateTypeEnum.Loading) as LoadingState; lState.SetNextState(GameStateTypeEnum.Room); lState.SetFrontScenes(View.EScenesType.EST_Play); SetStateTo(GameStateTypeEnum.Loading); } break; case GameEventEnum.IntoLobby: { LoadingState lState = GameStateManager.Instance.getState(GameStateTypeEnum.Loading) as LoadingState; lState.SetNextState(GameStateTypeEnum.Lobby); lState.SetFrontScenes(View.EScenesType.EST_Play); SetStateTo(GameStateTypeEnum.Loading); } break; } }
public void OnEvent(FEvent evt) { switch ((GameEventEnum)evt.GetEventId()) { case GameEventEnum.IntoLobby: GameStateManager.Instance.ChangeGameStateTo(GameStateTypeEnum.Lobby); //改变游戏状态,改为Lobby状态 break; } }
void OnEvent(FEvent eve) { switch ((GameEventEnum)eve.GetEventId()) { case GameEventEnum.GameEvent_SSPingInfo: float ping = (float)eve.GetParam("ping"); ShowPingIcon(ping); break; } }
public void OnEvent(FEvent evt) { switch ((GameEventEnum)evt.GetEventId()) { case GameEventEnum.RoomBack: SetStateTo(GameStateTypeEnum.Lobby); break; case GameEventEnum.IntoHero: SetStateTo(GameStateTypeEnum.Hero); break; } }
public void OnEvent(FEvent evt) { UIPlayMovie.PlayMovie("cg.mp4", Color.black, 2 /* FullScreenMovieControlMode.Hidden*/, 3 /*FullScreenMovieScalingMode.Fill*/); switch ((GameEventEnum)evt.GetEventId()) { case GameEventEnum.InputUserData: SetStateTo(GameStateTypeEnum.User); break; case GameEventEnum.IntoLobby: GameStateManager.Instance.ChangeGameStateTo(GameStateTypeEnum.Lobby); break; } }
public void OnEvent(FEvent evt) { switch ((GameEventEnum)evt.GetEventId()) { case GameEventEnum.IntoRoom: { //获取当前状态 LoadingState lState = GameStateManager.Instance.getState(GameStateTypeEnum.Loading) as LoadingState; lState.SetNextState(GameStateTypeEnum.Room); lState.SetFrontScenes(View.EScenesType.EST_Play); SetStateTo(GameStateTypeEnum.Loading); } break; } }
private void OnEvent(FEvent evt) { switch ((GameEventEnum)evt.GetEventId()) { case GameEventEnum.Loading: { GameStateTypeEnum stateType = (GameStateTypeEnum)evt.GetParam("NextState"); if (stateType != GameStateTypeEnum.Play) { return; } timeStart = Time.time; tagCheck = true; } break; } }
public void OnEvent(FEvent evt) { switch ((GameEventEnum)evt.GetEventId()) { case GameEventEnum.GameEvent_IntoRoom: //创建房间(自定义) SetStateTo(GameStateTypeEnum.GS_Room); break; case GameEventEnum.GameEvent_IntoHero: //英雄选择 GameStateManager.Instance.ChangeGameStateTo(GameStateTypeEnum.GS_Hero); break; case GameEventEnum.GameEvent_Loading: //加载状态 GameStateTypeEnum stateType = (GameStateTypeEnum)evt.GetParam("NextState"); LoadingState lState = GameStateManager.Instance.getState(GameStateTypeEnum.GS_Loading) as LoadingState; lState.SetNextState(stateType); lState.SetFrontScenes(View.EScenesType.EST_Login); SetStateTo(GameStateTypeEnum.GS_Loading); break; } }
static public void SendEvent(FEvent evt) { Broadcast(evt.GetEventId(), evt); }