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