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

        return(path.Length);
    }
示例#2
0
 public int MoveToWtihNavInfo(Vector2Int destination)
 {
     Vector2Int[] path = navInfo.GetPath(destination);
     moveComponent.RequestMove(path);
     return(path.Length);
 }