PathfindingComponent.cs 812 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace ET
  3. {
  4. /// <summary>
  5. /// 同一块地图可能有多种寻路数据,玩家可以随时切换,怪物也可能跟玩家的寻路不一样,寻路组件应该挂在Unit上
  6. /// </summary>
  7. [ComponentOf(typeof(Unit))]
  8. public class PathfindingComponent: Entity, IAwake<string>, IDestroy
  9. {
  10. public static int FindRandomNavPosMaxRadius = 15000; // 随机找寻路点的最大半径
  11. public static float[] extents = {15, 10, 15};
  12. public string Name;
  13. public long NavMesh;
  14. [NoMemoryCheck]
  15. public float[] StartPos = new float[3];
  16. [NoMemoryCheck]
  17. public float[] EndPos = new float[3];
  18. [NoMemoryCheck]
  19. public float[] Result = new float[Recast.MAX_POLYS * 3];
  20. }
  21. }