Пример #1
0
 public bool ZhuijiZuoBiao(Vector2 point, float inDistance = 0, bool IsCanTurnFace = true)
 {
     if (inDistance != 0)
     {
         _zjDistance = inDistance;
     }
     setter.SetV2(point);
     if (!_aiPath.canMove)
     {
         _aiPath.canMove = true;
     }
     zhuijiRun(IsCanTurnFace);
     if (MoveToPoint(point, inDistance))
     {
         return(true);
     }
     if ((transform.position - _obj.transform.position).magnitude < _zjDistance)
     {
         ResetAll();
         return(true);
     }
     return(false);
 }
Пример #2
0
 public bool ZhuijiZuoBiao(Vector2 point, float inDistance = 1)
 {
     setter.SetV2(point);
     if (!_aiPath.canMove)
     {
         _aiPath.canMove = true;
     }
     if (((Vector2)transform.position - point).sqrMagnitude < inDistance)
     {
         _aiPath.canMove = false;
         return(true);
     }
     return(false);
 }