Inheritance: Terraria.Achievements.AchievementCondition
コード例 #1
0
 private NPCKilledCondition(short npcId)
     : base("NPC_KILLED_" + (object)npcId)
 {
     this._npcIds = new short[1] {
         npcId
     };
     NPCKilledCondition.ListenForPickup(this);
 }
コード例 #2
0
ファイル: NPCKilledCondition.cs プロジェクト: egshels/Sources
 public static AchievementCondition[] CreateMany(params short[] npcs)
 {
     AchievementCondition[] array = new AchievementCondition[npcs.Length];
     for (int i = 0; i < npcs.Length; i++)
     {
         array[i] = new NPCKilledCondition(npcs[i]);
     }
     return(array);
 }
コード例 #3
0
 public static AchievementCondition[] CreateMany(params short[] npcs)
 {
     AchievementCondition[] nPCKilledCondition = new AchievementCondition[(int)npcs.Length];
     for (int i = 0; i < (int)npcs.Length; i++)
     {
         nPCKilledCondition[i] = new NPCKilledCondition(npcs[i]);
     }
     return nPCKilledCondition;
 }
コード例 #4
0
 public static AchievementCondition[] CreateMany(params short[] npcs)
 {
     AchievementCondition[] nPCKilledCondition = new AchievementCondition[(int)npcs.Length];
     for (int i = 0; i < (int)npcs.Length; i++)
     {
         nPCKilledCondition[i] = new NPCKilledCondition(npcs[i]);
     }
     return(nPCKilledCondition);
 }
コード例 #5
0
		public static AchievementCondition[] CreateMany(params short[] npcs)
		{
			AchievementCondition[] array = new AchievementCondition[npcs.Length];
			for (int i = 0; i < npcs.Length; i++)
			{
				array[i] = new NPCKilledCondition(npcs[i]);
			}
			return array;
		}
コード例 #6
0
        public static AchievementCondition[] CreateMany(params short[] npcs)
        {
            var achievementConditionArray = new AchievementCondition[npcs.Length];

            for (var index = 0; index < npcs.Length; ++index)
            {
                achievementConditionArray[index] = new NPCKilledCondition(npcs[index]);
            }
            return(achievementConditionArray);
        }
コード例 #7
0
        private static void ListenForPickup(NPCKilledCondition condition)
        {
            if (!_isListenerHooked)
            {
                AchievementsHelper.OnNPCKilled += new AchievementsHelper.NPCKilledEvent(NPCKilledListener);
                _isListenerHooked = true;
            }

            for (int index = 0; index < condition._npcIds.Length; ++index)
            {
                if (!_listeners.ContainsKey(condition._npcIds[index]))
                    _listeners[condition._npcIds[index]] = new List<NPCKilledCondition>();
                _listeners[condition._npcIds[index]].Add(condition);
            }
        }
コード例 #8
0
ファイル: NPCKilledCondition.cs プロジェクト: egshels/Sources
 private static void ListenForPickup(NPCKilledCondition condition)
 {
     if (!_isListenerHooked)
     {
         AchievementsHelper.OnNPCKilled += NPCKilledListener;
         _isListenerHooked = true;
     }
     for (int i = 0; i < condition._npcIds.Length; i++)
     {
         if (!_listeners.ContainsKey(condition._npcIds[i]))
         {
             _listeners[condition._npcIds[i]] = new List <NPCKilledCondition>();
         }
         _listeners[condition._npcIds[i]].Add(condition);
     }
 }
コード例 #9
0
 private static void ListenForPickup(NPCKilledCondition condition)
 {
     if (!NPCKilledCondition._isListenerHooked)
     {
         AchievementsHelper.OnNPCKilled      += new AchievementsHelper.NPCKilledEvent(NPCKilledCondition.NPCKilledListener);
         NPCKilledCondition._isListenerHooked = true;
     }
     for (int index = 0; index < condition._npcIds.Length; ++index)
     {
         if (!NPCKilledCondition._listeners.ContainsKey(condition._npcIds[index]))
         {
             NPCKilledCondition._listeners[condition._npcIds[index]] = new List <NPCKilledCondition>();
         }
         NPCKilledCondition._listeners[condition._npcIds[index]].Add(condition);
     }
 }
コード例 #10
0
 private static void ListenForPickup(NPCKilledCondition condition)
 {
     if (!NPCKilledCondition._isListenerHooked)
     {
         AchievementsHelper.OnNPCKilled += new AchievementsHelper.NPCKilledEvent(NPCKilledCondition.NPCKilledListener);
         NPCKilledCondition._isListenerHooked = true;
     }
     for (int i = 0; i < (int)condition._npcIds.Length; i++)
     {
         if (!NPCKilledCondition._listeners.ContainsKey(condition._npcIds[i]))
         {
             NPCKilledCondition._listeners[condition._npcIds[i]] = new List<NPCKilledCondition>();
         }
         NPCKilledCondition._listeners[condition._npcIds[i]].Add(condition);
     }
 }
コード例 #11
0
 private NPCKilledCondition(short[] npcIds)
     : base("NPC_KILLED_" + (object)npcIds[0])
 {
     this._npcIds = npcIds;
     NPCKilledCondition.ListenForPickup(this);
 }
コード例 #12
0
 private NPCKilledCondition(short[] npcIds) : base(string.Concat("NPC_KILLED_", npcIds[0]))
 {
     this._npcIds = npcIds;
     NPCKilledCondition.ListenForPickup(this);
 }
コード例 #13
0
 private NPCKilledCondition(short npcId) : base(string.Concat("NPC_KILLED_", npcId))
 {
     this._npcIds = new short[] { npcId };
     NPCKilledCondition.ListenForPickup(this);
 }