/// <summary> /// Internal Call for a Attacker Hit. /// </summary> /// <param name="item">Attacker</param> /// <param name="hitpoints">Hitpoints</param> internal void AttackerHit(AttackerProperty item, int hitpoints) { if (OnAttackerHit != null) { OnAttackerHit(item.Item, hitpoints); } }
/// <summary> /// Internal Call for every Attacker per Round. /// </summary> /// <param name="item">Attacker</param> internal void NoteAttackerItem(AttackerProperty item) { if (OnAttackerItem != null) { OnAttackerItem(item); } }
/// <summary> /// Internal Call to remove an Attacker from the List. /// </summary> /// <param name="item">Lost Attacker</param> internal void RemoveAttackerItem(AttackerProperty item) { if (attackerItems.Remove(item)) { if (OnLostAttackerItem != null) { OnLostAttackerItem(item); } } }
/// <summary> /// Default Constructor for the Type Mapper. /// </summary> /// <param name="item">Related Engine Item</param> /// <param name="property">Related Engine Property</param> public AttackerState(Item item, AttackerProperty property) : base(item, property) { AttackRange = property.AttackRange; AttackRecoveryTime = property.AttackRecoveryTime; AttackStrength = property.AttackStrength; property.OnAttackRangeChanged += (i, v) => { AttackRange = v; }; property.OnAttackRecoveryTimeChanged += (i, v) => { AttackRecoveryTime = v; }; property.OnAttackStrengthChanged += (i, v) => { AttackStrength = v; }; }
/// <summary> /// Internal Call to add another Attacker to the List. /// </summary> /// <param name="item">New Attacker</param> internal void AddAttackerItem(AttackerProperty item) { if (!attackerItems.Contains(item)) { attackerItems.Add(item); if (OnNewAttackerItem != null) { OnNewAttackerItem(item); } } }