Exemple #1
0
 public static int LayerFloodFill(Layer <int> layer, Point <int> start, int targetColor, int fillColor)
 {
     return(LayerFloodFill(
                layer,
                start,
                point => layer.Get(point) == targetColor, // fillCondition
                point => layer.Set(point, fillColor)      // fillAction
                ));
 }
Exemple #2
0
        public Layer(Layer <T> rhs)
        {
            tiles     = new T[rhs.size.x, rhs.size.y];
            this.min  = rhs.min;
            this.size = rhs.size;

            ForEachFromBottom((x, y, tile) =>
            {
                //KAI: this is a shallow copy.  Not sure how to represent this fact
                Set(x, y, rhs.Get(x, y));
            });
        }
Exemple #3
0
 public static int LayerFloodFill(Layer <int> layer, Point <int> start, int fillColor)
 {
     return(LayerFloodFill(layer, start, layer.Get(start), fillColor));
 }