public BorderedRectangle(BorderTileSet tileset, Rectangle position, Layer layer) { Layer = layer; layer.AddObject(this); Position = position; Tileset = tileset; RecalulateTiles(); }
public Menu(Layer interfaceLayer, SpriteFont font, BorderTileSet tileSet, IGameInputWithDPad input, MenuKeys menuKeys) { MenuPanel = new LayoutPanel(tileSet, interfaceLayer); MenuPanel.Position.Center = Engine.GetScreenSize().Center; MenuPanel.Visible = false; Layer = interfaceLayer; Font = font; Input = input; MenuKeys = menuKeys; foreach (var group in interfaceLayer.Scene.UpdateGroups) { if (group.Priority != UpdatePriority.ModalMenu && group.Priority != UpdatePriority.Input) { group.AddPauseCondition(MenuPanel.IsVisible()); } } interfaceLayer.Scene.AddObject(this); }
public TileMaskMap(int columns, int rows, BorderTileSet tileSet) : this(new ArrayGrid <bool>(new Vector2(columns, rows)), tileSet) { }
public TileMaskMap(ArrayGrid <bool> tiles, BorderTileSet tileSet) { TileFlags = new ArrayGrid <TileMaskValue>(tiles.Columns, tiles.Select(p => p ? TileMaskValue.Filled : TileMaskValue.Empty)); TileFlags.ReplaceOutOfBoundsTilesWithAdjacent = true; TileSet = tileSet; }
public LayoutPanel(BorderTileSet tileSet, Layer layer) { Border = new BorderedRectangle(tileSet, Rectangle.Empty(), layer); }