CEngineSharp_Client.World.Map.ResizeMap C# (CSharp) Method

ResizeMap() public method

public ResizeMap ( int newWidth, int newHeight ) : void
newWidth int
newHeight int
return void
        public void ResizeMap(int newWidth, int newHeight)
        {
            var newArray = new Tile[newWidth, newHeight];
            int columnCount = this._tiles.GetLength(1);
            int columnCount2 = newHeight;
            int columns = this._tiles.GetUpperBound(0);
            for (int co = 0; co <= columns; co++)
                Array.Copy(this._tiles, co * columnCount, newArray, co * columnCount2, columnCount);

            this._tiles = newArray;
        }