Inheritance: Terraria.Achievements.AchievementCondition
Esempio n. 1
0
 private ItemPickupCondition(short itemId)
     : base("ITEM_PICKUP_" + (object)itemId)
 {
     this._itemIds = new short[1] {
         itemId
     };
     ItemPickupCondition.ListenForPickup(this);
 }
 public static AchievementCondition[] CreateMany(params short[] items)
 {
     AchievementCondition[] itemPickupCondition = new AchievementCondition[(int)items.Length];
     for (int i = 0; i < (int)items.Length; i++)
     {
         itemPickupCondition[i] = new ItemPickupCondition(items[i]);
     }
     return itemPickupCondition;
 }
 public static AchievementCondition[] CreateMany(params short[] items)
 {
     AchievementCondition[] array = new AchievementCondition[items.Length];
     for (int i = 0; i < items.Length; i++)
     {
         array[i] = new ItemPickupCondition(items[i]);
     }
     return(array);
 }
		public static AchievementCondition[] CreateMany(params short[] items)
		{
			AchievementCondition[] array = new AchievementCondition[items.Length];
			for (int i = 0; i < items.Length; i++)
			{
				array[i] = new ItemPickupCondition(items[i]);
			}
			return array;
		}
        public static AchievementCondition[] CreateMany(params short[] items)
        {
            var achievementConditionArray = new AchievementCondition[items.Length];

            for (var index = 0; index < items.Length; ++index)
            {
                achievementConditionArray[index] = new ItemPickupCondition(items[index]);
            }
            return(achievementConditionArray);
        }
Esempio n. 6
0
        private static void ListenForPickup(ItemPickupCondition condition)
        {
            if (!_isListenerHooked)
            {
                AchievementsHelper.OnItemPickup += new AchievementsHelper.ItemPickupEvent(ItemPickupListener);
                _isListenerHooked = true;
            }

            for (int index = 0; index < condition._itemIds.Length; ++index)
            {
                if (!_listeners.ContainsKey(condition._itemIds[index]))
                    _listeners[condition._itemIds[index]] = new List<ItemPickupCondition>();
                _listeners[condition._itemIds[index]].Add(condition);
            }
        }
 private static void ListenForPickup(ItemPickupCondition condition)
 {
     if (!ItemPickupCondition._isListenerHooked)
     {
         AchievementsHelper.OnItemPickup += new AchievementsHelper.ItemPickupEvent(ItemPickupCondition.ItemPickupListener);
         ItemPickupCondition._isListenerHooked = true;
     }
     for (int i = 0; i < (int)condition._itemIds.Length; i++)
     {
         if (!ItemPickupCondition._listeners.ContainsKey(condition._itemIds[i]))
         {
             ItemPickupCondition._listeners[condition._itemIds[i]] = new List<ItemPickupCondition>();
         }
         ItemPickupCondition._listeners[condition._itemIds[i]].Add(condition);
     }
 }
 private static void ListenForPickup(ItemPickupCondition condition)
 {
     if (!_isListenerHooked)
     {
         AchievementsHelper.OnItemPickup += ItemPickupListener;
         _isListenerHooked = true;
     }
     for (int i = 0; i < condition._itemIds.Length; i++)
     {
         if (!_listeners.ContainsKey(condition._itemIds[i]))
         {
             _listeners[condition._itemIds[i]] = new List <ItemPickupCondition>();
         }
         _listeners[condition._itemIds[i]].Add(condition);
     }
 }
Esempio n. 9
0
 private static void ListenForPickup(ItemPickupCondition condition)
 {
     if (!ItemPickupCondition._isListenerHooked)
     {
         AchievementsHelper.OnItemPickup      += new AchievementsHelper.ItemPickupEvent(ItemPickupCondition.ItemPickupListener);
         ItemPickupCondition._isListenerHooked = true;
     }
     for (int index = 0; index < condition._itemIds.Length; ++index)
     {
         if (!ItemPickupCondition._listeners.ContainsKey(condition._itemIds[index]))
         {
             ItemPickupCondition._listeners[condition._itemIds[index]] = new List <ItemPickupCondition>();
         }
         ItemPickupCondition._listeners[condition._itemIds[index]].Add(condition);
     }
 }
Esempio n. 10
0
 private ItemPickupCondition(short[] itemIds)
     : base("ITEM_PICKUP_" + (object)itemIds[0])
 {
     this._itemIds = itemIds;
     ItemPickupCondition.ListenForPickup(this);
 }
 private ItemPickupCondition(short[] itemIds) : base(string.Concat("ITEM_PICKUP_", itemIds[0]))
 {
     this._itemIds = itemIds;
     ItemPickupCondition.ListenForPickup(this);
 }
 private ItemPickupCondition(short itemId) : base(string.Concat("ITEM_PICKUP_", itemId))
 {
     this._itemIds = new short[] { itemId };
     ItemPickupCondition.ListenForPickup(this);
 }