コード例 #1
0
 public void UnsetPath()
 {
     if (this.m_path != null)
     {
         this.m_path.Invalidate();
     }
     this.m_path = null;
     base.UnsetTarget();
     this.PathFinished = true;
 }
コード例 #2
0
 public void UnsetPath()
 {
     ProfilerShort.Begin("UnsetPath");
     if (m_path != null)
     {
         m_path.Invalidate();
     }
     m_path = null;
     UnsetTarget();
     PathFinished = true;
     ProfilerShort.End();
 }
コード例 #3
0
 public void UnsetPath()
 {
     ProfilerShort.Begin("UnsetPath");
     if (m_path != null)
     {
         m_path.Invalidate();
     }
     m_path = null;
     UnsetTarget();
     PathFinished = true;
     ProfilerShort.End();
 }
コード例 #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);
         }
     }
 }
コード例 #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();
     }
 }
コード例 #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();
        }
コード例 #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();
        }
コード例 #8
0
 public void FollowPath(IMyPath path)
 {
     m_path.SetPath(path);
     m_stuckDetection.Reset();
 }
コード例 #9
0
 public void FollowPath(IMyPath path)
 {
     m_path.SetPath(path);
     m_stuckDetection.Reset();
 }
コード例 #10
0
 public void FollowPath(IMyPath path)
 {
     this.m_path.SetPath(path, 1f);
     this.m_stuckDetection.Reset(false);
 }