MegaMan.Editor.Bll.StageDocument.AddScreen C# (CSharp) Method

AddScreen() public method

public AddScreen ( string name, int tile_width, int tile_height ) : ScreenDocument
name string
tile_width int
tile_height int
return ScreenDocument
        public ScreenDocument AddScreen(string name, int tile_width, int tile_height)
        {
            var screen = new ScreenInfo(name, Tileset.Tileset);

            int[,] tiles = new int[tile_width, tile_height];

            screen.Layers.Add(new ScreenLayerInfo(name, new TileLayer(tiles, Tileset.Tileset, 0, 0), false, new List<ScreenLayerKeyframe>()));

            _map.Screens.Add(name, screen);

            if (StartScreen == null)
            {
                _map.StartScreen = _map.Screens.Keys.First();
                Dirty = true;
            }

            ScreenDocument doc = WrapScreen(screen);

            if (ScreenAdded != null) ScreenAdded(doc);

            return doc;
        }

Same methods

StageDocument::AddScreen ( ScreenInfo screen ) : void