コード例 #1
0
    //returns the list of tile indexes along the path to the destinationIndex
    public IEnumerator findPathVoid(int tileThere)
    {
        int tileHere = hexa.GetTileAtLocalPos(transform.position);

        path = hexa.FindPath(tileHere, tileThere, 0, -1);

        yield return(null);
    }
コード例 #2
0
ファイル: MoveUnit.cs プロジェクト: ZacTallberg/unity_basics
    public List <int> findPath(int tileThere)
    {
        //Get the index of the tile we're currently at
        int tileHere = hexa.GetTileAtLocalPos(transform.position);
        //Get a list of all the tiles from here to there
        List <int> tiles = hexa.FindPath(tileHere, tileThere, 0, -1);



        return(tiles);
    }