Ejemplo n.º 1
0
 public override void ProcessCell(IRuntimeContext context, Town[] output, long x, long y, long z, int i, int j, int k, int width, int height, int depth, int ox, int oy, int oz)
 {
     if (this.GuaranteeStartingPoint && x == 0 && y == 0)
     {
         output[(i + ox) + (j + oy) * width + (k + oz) * width * height] = new Town();
     }
     else if (!Layer2D && context.GetRandomDouble(x, y, z, context.Modifier) > this.Limit)
     {
         output[(i + ox) + (j + oy) * width + (k + oz) * width * height] = new Town();
     }
     else if (Layer2D && context.GetRandomDouble(x, y, 0, context.Modifier) > this.Limit)
     {
         output[(i + ox) + (j + oy) * width + (k + oz) * width * height] = new Town();
     }
     else
     {
         output[(i + ox) + (j + oy) * width + (k + oz) * width * height] = null;
     }
 }