private Vector3[] GenerateDirPathToTarget(MovementMode mode, AITargeter source, AITargeter target)
 {
     if (mode == MovementMode.AdditiveSetForward)
     {
         return new Vector3[1] {
                    (target.transform.position - source.transform.position) / 10
         }
     }
     ;
     else if (mode == MovementMode.AdditiveToTransform)
     {
         return new Vector3[1] {
                    source.transform.InverseTransformDirection(target.transform.position - source.transform.position) / 10
         }
     }
     ;
     else if (mode == MovementMode.SetToForward)
     {
         return(CircleMotion.GeneratePtToPtMotionOnForw(source, target, 16));
     }
     else
     {
         Debug.Log("Unsupported mode. [PathfindToTargetMotion]" + mode);
     }
     return(new Vector3[0]);
 }
Exemplo n.º 2
0
 private Vector3[] GenerateDirPathToTarget(MovementMode mode, AITargeter source, AITargeter target)
 {
     if (mode == MovementMode.SetToForward)
     {
         return(CircleMotion.GeneratePtToPtMotionOnForw(source, target, 16));
     }
     else
     {
         Debug.Log("Unsupported mode. [MoveToEnemy]" + mode);
     }
     return(new Vector3[0]);
 }