toArray() public method

public toArray ( ) : int[]
return int[]
Example #1
0
        private void mapScreen_Paint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            if (curTileStruct == null)
            {
                g.Clear(Color.Black);
                return;
            }
            var visibleRect = UtilsGui.getVisibleRectangle(this, mapScreen);

            g.Clear(Color.Black);
            var blockLayer = new BlockLayer(curTileStruct.toArray());

            blockLayer.showLayer = true;
            var screens = new[] { new Screen(blockLayer, curTileStruct.width, curTileStruct.height) };

            MapEditor.render(g, screens, 0, new MapEditor.RenderParams
            {
                bigBlocks               = bigBlocks,
                visibleRect             = visibleRect,
                curScale                = 2.0f,
                showBlocksAxis          = formMain.showAxis,
                showBorder              = false,
                width                   = curTileStruct.width,
                height                  = curTileStruct.height,
                additionalRenderEnabled = false,
            });
        }
Example #2
0
        private void mapScreen_Paint(object sender, PaintEventArgs e)
        {
            var g = e.Graphics;

            if (curTileStruct == null)
            {
                g.Clear(Color.Black);
                return;
            }
            var visibleRect = UtilsGui.getVisibleRectangle(this, mapScreen);

            g.Clear(Color.Black);
            var blockLayer = new BlockLayer()
            {
                screens = new int[1][] { curTileStruct.toArray() }, showLayer = true, blockWidth = 32, blockHeight = 32
            };

            MapEditor.Render(g, bigBlocks, visibleRect, new BlockLayer[] { blockLayer }, 0, 2.0f, false, formMain.ShowAxis, 0, 0, curTileStruct.Width, curTileStruct.Height);
        }