public override void Paint(Level level) { WallRegistry.Paint(level, this, EntranceWallPool.Instance); var prop = new Exit { To = Run.Depth + 1 }; var where = GetCenter(); Painter.Fill(level, where.X - 1, where.Y - 1, 3, 3, Tiles.RandomFloor()); level.Area.Add(prop); prop.Center = (where * 16 + new Vector2(8)); }
public override void Paint(Level level) { if (IceDemoRoom()) { Painter.Fill(level, this, Tile.WallA); Painter.FillEllipse(level, this, 3, Tiles.RandomFloor()); level.Area.Add(new Turret { Position = GetTileCenter() * 16 + new Vector2(32, 0), StartingAngle = 0 }); } else { WallRegistry.Paint(level, this, EntranceWallPool.Instance); } var prop = new Entrance { To = Run.Depth + 1 }; var where = GetCenter(); Painter.Fill(level, where.X - 1, where.Y - 1, 3, 3, Tiles.RandomFloor()); level.Area.Add(prop); prop.Center = (where * 16 + new Vector2(8)); MakeSafe(level); try { if (Builder.ShouldAppear()) { var b = new Builder(); b.BottomCenter = where * 16 + new Vector2(8 + Rnd.Float(-16, 16), 20); level.Area.Add(b); } } catch (Exception e) { Log.Error(e); } if (Run.Type == RunType.BossRush && Run.Depth > 1) { var item = Items.CreateAndAdd("bk:battery", level.Area); item.Center = where * 16 + new Vector2(8 + Rnd.Float(-16, 16), Rnd.Float(-16, 16)); } }
private void Paint() { level.MarkForClearing(); level.Fill(Tile.WallA); var room = new RegularRoom(); if (fixedSize) { room.Resize(Math.Min(level.Width, roomWidth) + 1, Math.Min(level.Height, roomHeight) + 1); } else { room.SetSizeWithLimit(level.Width, level.Height); } room.SetPos((int)Math.Floor((level.Width - room.GetWidth()) / 2f), (int)Math.Floor((level.Height - room.GetHeight()) / 2f)); if (currentFloor == 0) { room.PaintFloor(level); } else if (currentFloor > 1) { FloorRegistry.Paint(level, room, currentFloor - 2); } if (currentWall == 0) { room.Paint(level); } else if (currentWall > 1) { WallRegistry.Paint(level, room, null, currentWall - 2); } level.TileUp(); }
public virtual void Paint(Level level) { WallRegistry.Paint(level, this); }