示例#1
0
 public void Inintialize(GameObject go, float speed)
 {
     rigidbody     = go.GetComponent <Rigidbody>();
     movementSpeed = speed;
     path          = null;
     FastPath.FastPath.DefaultMap.OnUpdate += () => { FindPath(); };
 }
示例#2
0
 private void FindPath()
 {
     if (destination == Vector3.zero)
     {
         Debug.Log("FindPath vector zero");
         return;
     }
     path         = new FastPath.Path(rigidbody.position, destination);
     currentIndex = 1;
 }
示例#3
0
 public void Stop()
 {
     destination = Vector3.zero;
     path        = null;
 }