コード例 #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
ファイル: AttackerState.cs プロジェクト: newice/AntMeCore
        /// <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);
         }
     }
 }