예제 #1
0
 public void UnsetPath()
 {
     ProfilerShort.Begin("UnsetPath");
     if (m_path != null)
     {
         m_path.Dispose();
     }
     m_path = null;
     UnsetTarget();
     PathFinished = true;
     ProfilerShort.End();
 }
예제 #2
0
        // 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();
        }
예제 #3
0
 public void FollowPath(MySmartPath path)
 {
     m_path.SetPath(path);
     m_stuckDetection.Reset();
 }