public override void Enter(GameStateParameter parameter) { base.Enter(parameter); EventSys.Instance.AddHander(InputEvent.CityExit, OnCityExitEvent); EventSys.Instance.AddHander(InputEvent.CityStartFight, OnCityStartFightEvent); }
public override void Enter(GameStateParameter parameter) { base.Enter(parameter); _fState = FSubState.SelectHero; _selectedHeros = new Dictionary <int, int>(); FightStateParameter fsParameter = (FightStateParameter)parameter; _stageName = fsParameter.nextType; EventSys.Instance.AddHander(InputEvent.FightExit, OnExitEvent); EventSys.Instance.AddHander(InputEvent.FightReady, OnFightReadyEvent); EventSys.Instance.AddHander(InputEvent.FightNodeClicked, OnClickFightNodeEvent); EventSys.Instance.AddHander(InputEvent.FightDragOnNode, OnFightDragOnNode); EventSys.Instance.AddHander(InputEvent.FightDragOnHero, OnFightDragOnHero); EventSys.Instance.AddHander(InputEvent.FightDragAllOnNode, OnFightDragAllOnNode); EventSys.Instance.AddHander(LogicEvent.FightLoseReturnToStage, OnFightLoseReturnToStage); EventSys.Instance.AddHander(LogicEvent.FightWinReturnToStage, OnFightWinReturnToStage); EventSys.Instance.AddHander(InputEvent.StageNodeClicked, OnStateNodeClicked); EventSys.Instance.AddHander(InputEvent.StageHeroNodeClicked, OnStateHeroNodeClicked); EventSys.Instance.AddHander(InputEvent.FightNodeDetailComfirmed, (param1, param2) => { }); EventSys.Instance.AddHander(InputEvent.RewardNodeDetailComfirmed, (param1, param2) => { }); EventSys.Instance.AddHander(InputEvent.RewardNodeGet, GetReward); }
public override void Enter(GameStateParameter parameter) { CatDebug.LogFunc(); base.Enter(parameter); EventSys.Instance.AddHander(InputEvent.LoginLogin, OnLoginEvent); }
public virtual void Enter(GameStateParameter parameter) { CatDebug.LogFuncInStack(1); EventSys.Instance.AddHander(LogicEvent.SceneLoadEnd, OnSceneLoaded); EventSys.Instance.AddHander(FrameEvent.PreloadEnd, OnPreLoadEnd); EventSys.Instance.AddHander(LogicEvent.UiInsEnd, OnUiLoaded); EventSys.Instance.AddEvent(LogicEvent.EnterState, GetType()); StartLoad(); }
void OnChangeState(object p1, object p2) { Type t = (Type)p1; _willStateParameter = null; if (p2 != null) { _willStateParameter = (GameStateParameter)p2; } ChangeState(t); }