public void UnsetPath() { ProfilerShort.Begin("UnsetPath"); if (m_path != null) { m_path.Dispose(); } m_path = null; UnsetTarget(); PathFinished = true; ProfilerShort.End(); }
// CH: TODO: Make a path pool and transfer ownership by calling this method (or any similar) public void SetPath(MySmartPath path, float weight = 1.0f) { if (path == null || !path.IsValid) { UnsetPath(); return; } if (m_path != null) { m_path.Dispose(); } m_path = path; m_weight = weight; PathFinished = false; SetNextTarget(); }
public void FollowPath(MySmartPath path) { m_path.SetPath(path); m_stuckDetection.Reset(); }