Ejemplo n.º 1
0
 /// <summary>
 /// Sets color, background color, and character at the specified location.
 /// Ignores the Z buffer, if you want to check the Z buffer before setting the cell, use SetZCheck
 /// </summary>
 /// <param name="x">X position to set.</param>
 /// <param name="y">Y position to set.</param>
 /// <param name="cell">Cell to set.</param>
 public void Set(int x, int y, RLCell cell)
 {
     if (x >= 0 && y >= 0 && x < Width && y < Height)
     {
         cells[x, y] = cell;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Sets color, background color, and character at the specified location.
 /// </summary>
 /// <param name="x">X position to set.</param>
 /// <param name="y">Y position to set.</param>
 /// <param name="cell">Cell to set.</param>
 /// <param name="z">Z buffer value.</param>
 public void Set(int x, int y, RLCell cell, int z)
 {
     if (x >= 0 && y >= 0 && x < Width && y < Height && zBuffer[x, y] <= z)
     {
         zBuffer[x, y] = z;
         cells[x, y]   = cell;
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the color, background color, and character in the specified rectangle.
 /// </summary>
 /// <param name="x">X position to set.</param>
 /// <param name="y">Y position to set.</param>
 /// <param name="width">Width of the rectangle.</param>
 /// <param name="height">Height of the rectangle.</param>
 /// <param name="color">Color to set.</param>
 /// <param name="z">Z buffer value.</param>
 public void Set(int x, int y, int width, int height, RLCell cell, int z)
 {
     if (width > 0 && height > 0)
     {
         for (int iy = y; iy < height + y; iy++)
         {
             for (int ix = x; ix < width + x; ix++)
             {
                 Set(ix, iy, cell, z);
             }
         }
     }
 }