Exemplo n.º 1
0
 public BorderedRectangle(BorderTileSet tileset, Rectangle position, Layer layer)
 {
     Layer = layer;
     layer.AddObject(this);
     Position = position;
     Tileset  = tileset;
     RecalulateTiles();
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public TileMaskMap(int columns, int rows, BorderTileSet tileSet)
     : this(new ArrayGrid <bool>(new Vector2(columns, rows)), tileSet)
 {
 }
Exemplo n.º 4
0
 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;
 }
Exemplo n.º 5
0
 public LayoutPanel(BorderTileSet tileSet, Layer layer)
 {
     Border = new BorderedRectangle(tileSet, Rectangle.Empty(), layer);
 }