public bool NukeTiles(Mazes.Rect r) { for (int i = r.p.X; i < r.p.X + r.offset.X; i++) { for (int j = r.p.Y; j < r.p.Y + r.offset.Y; j++) { Main.tile[i, j].active = false; Main.tile[i, j].type = 0; //Main.tile[i, j].lava = false; //Main.tile[i, j].liquid = 0; //Main.tile[i, j].wall = 0; //Main.tile[i, j].wire = false; } } return(true); }
private bool TestPointForTunnel(Mazes.Point p) { // check that the point is within the selected area, and is active (has a tile on it) Mazes.Rect r = new Mazes.Rect(x, y, x2 - (this.totalWidth * 2), y2 - (this.totalWidth * 2)); return (r.PointInRect(p) && Main.tile[p.X, p.Y].active()); }
private bool TestPointForTunnel(Mazes.Point p) { // check that the point is within the selected area, and is active (has a tile on it) Mazes.Rect r = new Mazes.Rect(x, y, x2 - (this.totalWidth * 2), y2 - (this.totalWidth * 2)); return(r.PointInRect(p) && Main.tile[p.X, p.Y].active); }