public override void Act(GameStateContext context) => gameEvent.Broadcast();
/// <summary> /// 当游戏进入主循环时候调用 /// </summary> /// <param name="context">状态机上下文</param> public abstract void OnLogicTick(GameStateContext context);
/// <summary> /// 当退出状态的时候调用,一般用于销毁UI、清除事件、回收资源 /// </summary> /// <param name="context">状态机上下文</param> public abstract void OnExit(GameStateContext context);
/// <summary> /// 当进入状态的时候调用,一般用于初始化UI、注册事件 /// </summary> /// <param name="context">状态机上下文</param> public abstract void OnEnter(GameStateContext context);
/// <summary> /// 当游戏进入主循环时候调用 /// </summary> /// <param name="context">状态机上下文</param> public abstract void OnRenderTick(GameStateContext context);
public ScoreSystem(GameContext Game, GameStateContext GameState) : base(Game) { _GameState = GameState; }
protected void EvStateEnter(GameStateContext context) { this.context = context; StartCoroutine(Animate()); }
public CalculateHashCode(Contexts contexts) { _gameStateContext = contexts.gameState; _hashableEntities = contexts.game.GetGroup(GameMatcher.AllOf(GameMatcher.LocalId, GameMatcher.Position).NoneOf(GameMatcher.Backup)); }
public override void OnEnter(GameStateContext context) { SceneManager.LoadScene("Regist"); EventSystem.AddListener(EventID.BackLogin, OnBackLogin); }
public override void OnRenderTick(GameStateContext context) { }
public override void OnLogicTick(GameStateContext context) { }
public override void OnExit(GameStateContext context) { EventSystem.RemoveListener(EventID.BackLogin, OnBackLogin); }