Exemple #1
0
        public void ActionDone(int player)
        {
            BeforeActionDone?.Invoke(player);
            OnActionDone?.Invoke(player);

            // 处理所属当前队伍的 ai
            if (AIs.ContainsKey(player))
            {
                var ais = AIs[player].Values.ToArray();
                ais.Resort();
                foreach (var id in AIs[player].Keys.ToArray())
                {
                    AIs[player][id].ActLast?.Invoke();
                }
            }

            AfterActionDone?.Invoke(player);

            TryBattleEnd();          // 回合结束时检查战斗结束条件
            Move2NextPlayer(player); // 行动机会转移至下一队伍
        }
Exemple #2
0
 private void ActionDone()
 {
     IsExecuting = false;
     OnActionDone.Invoke();
 }
Exemple #3
0
 /// <summary>
 /// Any logic that should happen when the command stops (for instance registering undo) can be done here.
 /// </summary>
 public virtual void Stop()
 {
     OnActionDone?.Invoke(this);
 }