Ejemplo n.º 1
0
    /// <summary>
    /// Use this for initialization.
    /// </summary>
    private void Start()
    {
        grid = FindObjectOfType <PathGridManager>();

        if (grid == null)
        {
            Debug.LogError("Could not find a PathGridManager in the scene.");
        }
        else
        {
            // Gets the total number of nodes in the grid
            totalNodes = grid.GetGridSize().x *grid.GetGridSize().y;
        }
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     m_Grid = GetComponent <PathGridManager>();
 }