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); } }
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); } } } }
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); } } } }