示例#1
0
文件: SpellMenu.cs 项目: jpx/blazera
        public void Build(BaseCombatant combatant)
        {
            Clear();

            CurrentCombatant = combatant;
            IEnumerator<Spell> spells = CurrentCombatant.SpellPanoply.GetEnumrator();
            while (spells.MoveNext())
                AddSpellItem(spells.Current);
        }
示例#2
0
 public CombatCombatantEventArgs(BaseCombatant combatant)
     : base()
 {
     Combatant = combatant;
 }
示例#3
0
        bool RemoveCombatant(BaseCombatant combatant)
        {
            CallOnCombatantLeaving(combatant);
            return Combatants.Remove(combatant);

            combatant.OnMove -= new CombatantMoveEventHandler(combatant_OnMove);
        }
示例#4
0
 void combatant_OnMove(BaseCombatant sender, CombatantMoveEventArgs e)
 {
     CellSet.GetCell(e.OldCellPosition).RemoveCombatant(sender);
     CellSet.GetCell(e.CellPosition).AddCombatant(sender);
 }
示例#5
0
 bool CallOnCombatantLeaving(BaseCombatant combatant)
 {
     if (OnCombatantLeaving == null) return false; OnCombatantLeaving(this, new CombatCombatantEventArgs(combatant)); return true;
 }
示例#6
0
        void AddCombatant(BaseCombatant combatant)
        {
            CallOnCombatantJoining(combatant);
            Combatants.Add(combatant);

            combatant.OnMove += new CombatantMoveEventHandler(combatant_OnMove);
        }
示例#7
0
        public void ChangeTurn()
        {
            if (CurrentCombatant != null)
                CallOnCombatantStopTurning();

            CurrentCombatant = CombatantOrder.GetNextAliveCombat();

            CallOnCombatantStartTurning();
        }
示例#8
0
 public bool RemoveCombatant(BaseCombatant combatant)
 {
     return Combatants.Remove(combatant);
 }
示例#9
0
 public void AddCombatant(BaseCombatant combatant)
 {
     Combatants.Add(combatant);
 }
示例#10
0
            public CMoveInfo(BaseCombatant combatant)
            {
                Combatant = combatant;

                Moves = new Queue<Vector2I>();
                MovePoints = new Queue<Vector2I>();

                PointIsReached = true;
            }