예제 #1
0
 private void CollectCustom(CustomMapType SelectedMap)
 {
     foreach (var Point in SelectedMap.FindComponents <PointComponent>())
     {
         AddPoint(Point.Position);
     }
 }
예제 #2
0
        private void CollectCustom(CustomMapType MapType, IReadOnlyList <Team> EnabledTeams)
        {
            var TeamIndex = 0;
            var Count     = EnabledTeams.Count;

            foreach (var Flag in MapType.FindComponents <FlagComponent>())
            {
                var Valid = (Flag.For2 && Count == 2) ||
                            (Flag.For3 && Count == 3) ||
                            (Flag.For4 && Count == 4);

                if (!Valid)
                {
                    continue;
                }
                AddFlag(Flag.Position, EnabledTeams[TeamIndex]);
                TeamIndex++;
            }
        }