NPCSteeringDebugEvent.cs 877 B

123456789101112131415161718192021222324252627282930313233
  1. using System.Numerics;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.NPC.Events;
  4. /// <summary>
  5. /// Client debug data for NPC steering
  6. /// </summary>
  7. [Serializable, NetSerializable]
  8. public sealed class NPCSteeringDebugEvent : EntityEventArgs
  9. {
  10. public List<NPCSteeringDebugData> Data;
  11. public NPCSteeringDebugEvent(List<NPCSteeringDebugData> data)
  12. {
  13. Data = data;
  14. }
  15. }
  16. [Serializable, NetSerializable]
  17. public readonly record struct NPCSteeringDebugData(
  18. NetEntity EntityUid,
  19. Vector2 Direction,
  20. float[] Interest,
  21. float[] Danger,
  22. List<Vector2> DangerPoints)
  23. {
  24. public readonly NetEntity EntityUid = EntityUid;
  25. public readonly Vector2 Direction = Direction;
  26. public readonly float[] Interest = Interest;
  27. public readonly float[] Danger = Danger;
  28. public readonly List<Vector2> DangerPoints = DangerPoints;
  29. }