/// <summary>
        ///   Recursively updates the configuration and all it's children by inspecting
        ///   the 'pathType' attribute of the config
        /// </summary>
        /// <param name="config">Configuration to be updated</param>
        /// <param name="type">Path type</param>
        public static void ConvertPaths(IConfiguration config, EPathType? type)
        {
            type = GetPathType(config) ?? type;

              if (type != null && !string.IsNullOrWhiteSpace(config.Value))
              {
            string newValue = Path.GetFullPath(PathConversions[type.Value](config.Value));

            MutableConfiguration cfg = (MutableConfiguration)config;
            cfg.Value = newValue;
              }

              foreach (IConfiguration subConfig in config.Children)
            ConvertPaths(subConfig, type);
        }
Example #2
0
 internal void ProcessFinishedPath(AStarMachine.AStarMachine path, EPathType pathType, bool canAddRevs = false)//todo
 {
     if (path.Agent != null)
     {
         AgentBase agent = path.Agent as AgentBase;
         if (agent != null && agent.searchFinished != null)
         {
             agent.searchFinished(path, pathType, canAddRevs);
         }
         if (!path.IsWorking)
         {
             ((AStarAgent)agent)._asm = null;
         }
     }
     if (!path.IsWorking && !path._inQueue)
     {
         ClearFinishedPath(path);
     }
 }