Пример #1
0
 protected override void Process()
 {
     output = new EntityCollection();
     foreach (KeyValuePair <Coordinate, HashSet <string> > chunk in input.AllChunks)
     {
         System.Random rng = RNG(chunk.Key);
         foreach (string entityID in chunk.Value)
         {
             for (int x = 0; x < numberToAdd; x++)
             {
                 if (!input.TryGetEntity(entityID, out IEntity entity))
                 {
                     continue;
                 }
                 output.AddEntity(new Entity(entity.Position + rng.GetPointInCircle(maxDistance)));
             }
         }
     }
 }