Beispiel #1
0
    //x and z are the center of cell
    public bool CanBuildOnTheMap(int x, int z, float height, Vector3 collider)
    {
        int xIndex = -1;
        int zIndex = -1;

        MapUtility.CalCellIndexByCenter(x, z, collider, ref xIndex, ref zIndex);
        return(canBuildOnTheMapInternal(xIndex, zIndex, height, collider));
    }
Beispiel #2
0
    public void WriteCellData(int x, int z, Vector3 assetSize, UnitType unitType, float height = 0)
    {
        int xIndex = -1;
        int zIndex = -1;

        MapUtility.CalCellIndexByCenter(x, z, assetSize, ref xIndex, ref zIndex);
        writeCellDataInternal(xIndex, zIndex, assetSize, unitType, height);
    }