BSPTree.getGrid C# (CSharp) Method

getGrid() public static method

public static getGrid ( ) : Grid,
return Grid,
    public static Grid getGrid()
    {
        return levelGrid;
    }

Usage Example

Ejemplo n.º 1
0
    public void surroundTilesWithWall(int _x, int _y)
    {
        if (BSPTree.getGrid().getTile(_x + 1, _y) == 0)
        {
            BSPTree.setTile(_x + 1, _y, 2);
        }

        if (BSPTree.getGrid().getTile(_x - 1, _y) == 0)
        {
            BSPTree.setTile(_x - 1, _y, 2);
        }

        if (BSPTree.getGrid().getTile(_x, _y + 1) == 0)
        {
            BSPTree.setTile(_x, _y + 1, 2);
        }

        if (BSPTree.getGrid().getTile(_x, _y - 1) == 0)
        {
            BSPTree.setTile(_x, _y - 1, 2);
        }
    }