public GroupData Get(CreepGroups groupName)
        {
            if (groupData.Any(data => data.Key == groupName))
            {
                return(groupData[groupName]);
            }
            var newGroupData = DefaultGroupDataForTesting.GetDefaultGroupData(groupName);

            groupData.Add(groupName, newGroupData);
            return(groupData[groupName]);
        }
Пример #2
0
 private void GetCreepSpawnList()
 {
     foreach (var name in SpawnTypeList)
     {
         if (creepList.Contains(name))
         {
             CreepsAndGroupsList.Add(GroupData.FindAppropriateCreepType(name));
             TotalCreepsInWave++;
         }
         else if (groupList.Contains(name))
         {
             var groupName = (CreepGroups)Enum.Parse(typeof(CreepGroups), name);
             var groupData = DefaultGroupDataForTesting.GetDefaultGroupData(groupName);
             CreepsAndGroupsList.Add(groupData);
             TotalCreepsInWave += groupData.CreepList.Count;
         }
     }
 }