AStarConfig.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using ETModel;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. namespace PF
  4. {
  5. public class AStarConfig: Component
  6. {
  7. public static AStarConfig Instance { get; private set; }
  8. public AStarConfig()
  9. {
  10. Instance = this;
  11. }
  12. [BsonIgnore]
  13. public NavGraph[] graphs;
  14. public ushort debugPathID;
  15. public bool prioritizeGraphs;
  16. public bool fullGetNearestSearch;
  17. public float heuristicScale = 1;
  18. public Heuristic heuristic = Heuristic.Euclidean;
  19. public PathLog logPathResults = PathLog.None;
  20. // prioritizeGraphs为true才起作用
  21. public float prioritizeGraphsLimit = 1f;
  22. public float maxFrameTime = 1f;
  23. public EuclideanEmbedding euclideanEmbedding = new EuclideanEmbedding();
  24. public float maxNearestNodeDistance = 4f;
  25. /** Max Nearest Node Distance Squared.
  26. * \see #maxNearestNodeDistance */
  27. [BsonIgnore]
  28. public float maxNearestNodeDistanceSqr {
  29. get
  30. {
  31. return maxNearestNodeDistance * maxNearestNodeDistance;
  32. }
  33. }
  34. [BsonIgnore]
  35. public PathHandler debugPathData;
  36. [BsonIgnore]
  37. public PathProcessor pathProcessor;
  38. }
  39. }