AStarConfig.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using ET;
  2. using MongoDB.Bson.Serialization.Attributes;
  3. namespace PF
  4. {
  5. public class AStarConfig: Entity
  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. }