Beispiel #1
0
 /**
  * The filling process involves iterating over the whole map, clearing or setting the block mask, and painting the specified texture
  *   (using the specified rect!), or an alternative if the odds were in favor.
  */
 public override void Process(Action <uint, uint, Texture2D, Rect> painter, Bitmask currentBlockMask)
 {
     currentBlockMask.Fill(Blocking);
     for (uint y = 0; y < Height; y++)
     {
         for (uint x = 0; x < Width; x++)
         {
             Rect?picked = (OtherTilesPicker != null) ? OtherTilesPicker.Pick() : null;
             painter(x, y, picked != null ? OtherTilesPicker.Source : Source, picked != null ? picked.Value : SourceRect);
         }
     }
 }