Exemple #1
0
 public void SetTileID(int x, int y, int id)
 {
     if (x >= 0 && x < field.GetWidth() && y >= 0 && y < field.GetHeight())
     {
         field.SetType(y, x, id);
     }
 }
Exemple #2
0
 public void Convert(Field2D field, int ins0, int xout)
 {
     for (int xp = 0; xp < this.width; xp++)
     {
         for (int yp = 0; yp < this.height; yp++)
         {
             if (field.GetType(this.x + xp, this.y + yp) == ins0)
             {
                 field.SetType(this.x + xp, this.y + yp, xout);
             }
         }
     }
 }
Exemple #3
0
 public void Convert(Field2D field, int ins0, int xout)
 {
     for (int xp = 0; xp < this.width; xp++)
     {
         for (int yp = 0; yp < this.height; yp++)
         {
             if (field.GetType(this.x + xp, this.y + yp) == ins0)
             {
                 field.SetType(this.x + xp, this.y + yp, xout);
             }
         }
     }
 }