public void Build(BaseCombatant combatant) { Clear(); CurrentCombatant = combatant; IEnumerator<Spell> spells = CurrentCombatant.SpellPanoply.GetEnumrator(); while (spells.MoveNext()) AddSpellItem(spells.Current); }
public CombatCombatantEventArgs(BaseCombatant combatant) : base() { Combatant = combatant; }
bool RemoveCombatant(BaseCombatant combatant) { CallOnCombatantLeaving(combatant); return Combatants.Remove(combatant); combatant.OnMove -= new CombatantMoveEventHandler(combatant_OnMove); }
void combatant_OnMove(BaseCombatant sender, CombatantMoveEventArgs e) { CellSet.GetCell(e.OldCellPosition).RemoveCombatant(sender); CellSet.GetCell(e.CellPosition).AddCombatant(sender); }
bool CallOnCombatantLeaving(BaseCombatant combatant) { if (OnCombatantLeaving == null) return false; OnCombatantLeaving(this, new CombatCombatantEventArgs(combatant)); return true; }
void AddCombatant(BaseCombatant combatant) { CallOnCombatantJoining(combatant); Combatants.Add(combatant); combatant.OnMove += new CombatantMoveEventHandler(combatant_OnMove); }
public void ChangeTurn() { if (CurrentCombatant != null) CallOnCombatantStopTurning(); CurrentCombatant = CombatantOrder.GetNextAliveCombat(); CallOnCombatantStartTurning(); }
public bool RemoveCombatant(BaseCombatant combatant) { return Combatants.Remove(combatant); }
public void AddCombatant(BaseCombatant combatant) { Combatants.Add(combatant); }
public CMoveInfo(BaseCombatant combatant) { Combatant = combatant; Moves = new Queue<Vector2I>(); MovePoints = new Queue<Vector2I>(); PointIsReached = true; }