Esempio n. 1
0
 public void UnsetPath()
 {
     if (this.m_path != null)
     {
         this.m_path.Invalidate();
     }
     this.m_path = null;
     base.UnsetTarget();
     this.PathFinished = true;
 }
Esempio n. 2
0
 public void UnsetPath()
 {
     ProfilerShort.Begin("UnsetPath");
     if (m_path != null)
     {
         m_path.Invalidate();
     }
     m_path = null;
     UnsetTarget();
     PathFinished = true;
     ProfilerShort.End();
 }
Esempio n. 3
0
 public void UnsetPath()
 {
     ProfilerShort.Begin("UnsetPath");
     if (m_path != null)
     {
         m_path.Invalidate();
     }
     m_path = null;
     UnsetTarget();
     PathFinished = true;
     ProfilerShort.End();
 }
Esempio n. 4
0
 public void Goto(IMyDestinationShape destination, MyEntity relativeEntity = null)
 {
     if (MyAIComponent.Static.Pathfinding != null)
     {
         IMyPath path = MyAIComponent.Static.Pathfinding.FindPathGlobal(this.PositionAndOrientation.Translation, destination, relativeEntity);
         if (path != null)
         {
             this.m_path.SetPath(path, 1f);
             this.m_stuckDetection.Reset(false);
         }
     }
 }
Esempio n. 5
0
 public void SetPath(IMyPath path, float weight = 1f)
 {
     if ((path == null) || !path.IsValid)
     {
         this.UnsetPath();
     }
     else
     {
         if (this.m_path != null)
         {
             this.m_path.Invalidate();
         }
         this.m_path       = path;
         this.m_weight     = weight;
         this.PathFinished = false;
         this.SetNextTarget();
     }
 }
Esempio n. 6
0
        // CH: TODO: Make a path pool and transfer ownership by calling this method (or any similar)
        public void SetPath(IMyPath path, float weight = 1.0f)
        {
            if (path == null || !path.IsValid)
            {
                UnsetPath();
                return;
            }

            if (m_path != null)
            {
                m_path.Invalidate();
            }

            m_path   = path;
            m_weight = weight;

            PathFinished = false;

            SetNextTarget();
        }
Esempio n. 7
0
        // CH: TODO: Make a path pool and transfer ownership by calling this method (or any similar)
        public void SetPath(IMyPath path, float weight = 1.0f)
        {
            if (path == null || !path.IsValid)
            {
                UnsetPath();
                return;
            }

            if (m_path != null)
            {
                m_path.Invalidate();
            }

            m_path = path;
            m_weight = weight;

            PathFinished = false;

            SetNextTarget();
        }
Esempio n. 8
0
 public void FollowPath(IMyPath path)
 {
     m_path.SetPath(path);
     m_stuckDetection.Reset();
 }
Esempio n. 9
0
 public void FollowPath(IMyPath path)
 {
     m_path.SetPath(path);
     m_stuckDetection.Reset();
 }
Esempio n. 10
0
 public void FollowPath(IMyPath path)
 {
     this.m_path.SetPath(path, 1f);
     this.m_stuckDetection.Reset(false);
 }