public override void Act(GameStateContext context) => gameEvent.Broadcast();
Esempio n. 2
0
 /// <summary>
 /// 当游戏进入主循环时候调用
 /// </summary>
 /// <param name="context">状态机上下文</param>
 public abstract void OnLogicTick(GameStateContext context);
Esempio n. 3
0
 /// <summary>
 /// 当退出状态的时候调用,一般用于销毁UI、清除事件、回收资源
 /// </summary>
 /// <param name="context">状态机上下文</param>
 public abstract void OnExit(GameStateContext context);
Esempio n. 4
0
 /// <summary>
 /// 当进入状态的时候调用,一般用于初始化UI、注册事件
 /// </summary>
 /// <param name="context">状态机上下文</param>
 public abstract void OnEnter(GameStateContext context);
Esempio n. 5
0
 /// <summary>
 /// 当游戏进入主循环时候调用
 /// </summary>
 /// <param name="context">状态机上下文</param>
 public abstract void OnRenderTick(GameStateContext context);
Esempio n. 6
0
 public ScoreSystem(GameContext Game, GameStateContext GameState) : base(Game)
 {
     _GameState = GameState;
 }
 protected void EvStateEnter(GameStateContext context)
 {
     this.context = context;
     StartCoroutine(Animate());
 }
Esempio n. 8
0
        public CalculateHashCode(Contexts contexts)
        {
            _gameStateContext = contexts.gameState;

            _hashableEntities = contexts.game.GetGroup(GameMatcher.AllOf(GameMatcher.LocalId, GameMatcher.Position).NoneOf(GameMatcher.Backup));
        }
Esempio n. 9
0
 public override void OnEnter(GameStateContext context)
 {
     SceneManager.LoadScene("Regist");
     EventSystem.AddListener(EventID.BackLogin, OnBackLogin);
 }
Esempio n. 10
0
 public override void OnRenderTick(GameStateContext context)
 {
 }
Esempio n. 11
0
 public override void OnLogicTick(GameStateContext context)
 {
 }
Esempio n. 12
0
 public override void OnExit(GameStateContext context)
 {
     EventSystem.RemoveListener(EventID.BackLogin, OnBackLogin);
 }