コード例 #1
0
        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
ファイル: CreepWave.cs プロジェクト: cyecp/DeltaEngine.OpenTK
 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;
         }
     }
 }