Exemplo n.º 1
0
    /// <summary>
    /// Grabs the position of the cell nearest to the given world
    /// position. If the position falls outside of the grid, then null
    /// is returend instead.
    /// </summary>
    /// <param name="realPosition">A world position</param>
    /// <returns>The position of the requested cell, or null.</returns>
    public Vector3?GridizeRealPostion(Vector3 realPosition)
    {
        CellPosition cell = dwellsOn.GridizeRealPosition(realPosition);

        if (cell != null)
        {
            return(dwellsOn.GetRealPosition(cell));
        }
        else
        {
            return(null);
        }
    }