Example #1
0
        /// <summary>
        /// Internal Call to remove a Carrier.
        /// </summary>
        /// <param name="carrier">Lost Carrier</param>
        internal void RemoveCarrier(CarrierProperty carrier)
        {
            if (!carrierItems.Contains(carrier))
            {
                return;
            }

            carrierItems.Remove(carrier);
            if (OnLostCarrierItem != null)
            {
                OnLostCarrierItem(carrier);
            }
        }
Example #2
0
        /// <summary>
        /// Internal Call to add another Carrier to the List.
        /// </summary>
        /// <param name="carrier">New Item</param>
        internal void AddCarrier(CarrierProperty carrier)
        {
            if (carrierItems.Contains(carrier))
            {
                return;
            }

            carrierItems.Add(carrier);
            if (OnNewCarrierItem != null)
            {
                OnNewCarrierItem(carrier);
            }
        }
Example #3
0
 /// <summary>
 /// Default Constructor for the Type Mapper.
 /// </summary>
 /// <param name="item">Related Engine Item</param>
 /// <param name="property">Related Engine Property</param>
 public CarrierState(Item item, CarrierProperty property) : base(item, property)
 {
     // Bind Strength to the Item Strength
     CarrierStrength = property.CarrierStrength;
     property.OnCarrierStrengthChanged += (i, v) => { CarrierStrength = v; };
 }