public void UnsetPath() { if (this.m_path != null) { this.m_path.Invalidate(); } this.m_path = null; base.UnsetTarget(); this.PathFinished = true; }
public void UnsetPath() { ProfilerShort.Begin("UnsetPath"); if (m_path != null) { m_path.Invalidate(); } m_path = null; UnsetTarget(); PathFinished = true; ProfilerShort.End(); }
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); } } }
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(); } }
// 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(); }
public void FollowPath(IMyPath path) { m_path.SetPath(path); m_stuckDetection.Reset(); }
public void FollowPath(IMyPath path) { this.m_path.SetPath(path, 1f); this.m_stuckDetection.Reset(false); }