1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using UnityEngine;
- namespace Pathfinding {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- public class FleePath : RandomPath {
-
-
-
-
- public FleePath () {}
-
-
-
-
- public static FleePath Construct (Vector3 start, Vector3 avoid, int searchLength, OnPathDelegate callback = null) {
- var p = PathPool.GetPath<FleePath>();
- p.Setup(start, avoid, searchLength, callback);
- return p;
- }
- protected void Setup (Vector3 start, Vector3 avoid, int searchLength, OnPathDelegate callback) {
- Setup(start, searchLength, callback);
-
-
-
- aim = start - (avoid-start)*10;
- }
- }
- }
|