Exemplo n.º 1
0
    async public UniTask <int> MoveToWtihNavInfo(Vector2Int destination)
    {
        Vector2Int[] path = navInfo.GetPath(destination);
        moveComponent.RequestMove(path);
        await MyUniTaskExtensions.WaitUntilEvent(moveComponent.eFinishPath);

        return(path.Length);
    }
Exemplo n.º 2
0
 public int MoveToWtihNavInfo(Vector2Int destination)
 {
     Vector2Int[] path = navInfo.GetPath(destination);
     moveComponent.RequestMove(path);
     return(path.Length);
 }