Пример #1
0
 /// <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);
     }
 }
Пример #2
0
 /// <summary>
 /// Internal Call for every Attacker per Round.
 /// </summary>
 /// <param name="item">Attacker</param>
 internal void NoteAttackerItem(AttackerProperty item)
 {
     if (OnAttackerItem != null)
     {
         OnAttackerItem(item);
     }
 }
Пример #3
0
 /// <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);
         }
     }
 }
Пример #4
0
        /// <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; };
        }
Пример #5
0
        /// <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; };
        }
Пример #6
0
 /// <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);
         }
     }
 }