コード例 #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;
        }
    }
コード例 #2
0
ファイル: A_Star.cs プロジェクト: TyniIlkka/AStar
 private void Awake()
 {
     m_Grid = GetComponent <PathGridManager>();
 }