Exemplo n.º 1
0
 /// <summary>
 /// 不通过寻路径直走向终点
 /// </summary>
 /// <param name="destination">终点</param>
 public void MoveToDirectly(Vector2Int destination)
 {
     Debug.Log("MoveToDirectly " + destination);
     moveComponent.RequestDirectMove(destination);
     location = destination;
     moveComponent.eFinishPath.AddListener(EnterLocation);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 不通过寻路径直走向终点
 /// </summary>
 /// <param name="destination">终点</param>
 async public UniTask MoveToDirectly(Vector2Int destination)
 {
     Debug.Log("MoveToDirectly " + destination);
     moveComponent.RequestDirectMove(destination);
     location = destination;
     moveComponent.eFinishPath.AddListenerForOnce(EnterLocation);
     await MyUniTaskExtensions.WaitUntilEvent(moveComponent.eFinishPath);
 }