XunLuoPathComponentSystem.cs 442 B

123456789101112131415161718
  1. using Unity.Mathematics;
  2. namespace ET.Client
  3. {
  4. [FriendOf(typeof(XunLuoPathComponent))]
  5. public static class XunLuoPathComponentSystem
  6. {
  7. public static float3 GetCurrent(this XunLuoPathComponent self)
  8. {
  9. return self.path[self.Index];
  10. }
  11. public static void MoveNext(this XunLuoPathComponent self)
  12. {
  13. self.Index = ++self.Index % self.path.Length;
  14. }
  15. }
  16. }