PathfindingManager.InitGrid C# (CSharp) Method

InitGrid() public method

public InitGrid ( ) : void
return void
    public void InitGrid()
    {
        /*if(gridCreated)
            return;

        GameObject go = GameObject.FindGameObjectWithTag("LevelGenerator");

        int cols = go.GetComponent<Generator>().cols;
        int rows = go.GetComponent<Generator>().rows;

        sources = PathNode.CreateGrid(new Vector3(0, 0.5f, 0), Vector3.one * 2.0f, new int[] { cols, rows}, 0.0f);

        GameObject player = GameObject.FindGameObjectWithTag("Player");

        if (sources != null)
        {
            gridCreated = true;
        }

        if (!playerPositionSet && sources != null)
        {
            Vector3 newPos = sources[PathNode.startNode].position + new Vector3(0.0f, 1.0f, 0.0f);

            player.transform.position = newPos;

            playerPositionSet = true;
        }*/
    }