MeleeLungeEvent.cs 984 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System.Numerics;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Weapons.Melee.Events;
  4. /// <summary>
  5. /// Data for melee lunges from attacks.
  6. /// </summary>
  7. [Serializable, NetSerializable]
  8. public sealed class MeleeLungeEvent : EntityEventArgs
  9. {
  10. public NetEntity Entity;
  11. /// <summary>
  12. /// The weapon used.
  13. /// </summary>
  14. public NetEntity Weapon;
  15. /// <summary>
  16. /// Width of the attack angle.
  17. /// </summary>
  18. public Angle Angle;
  19. /// <summary>
  20. /// The relative local position to the <see cref="Entity"/>
  21. /// </summary>
  22. public Vector2 LocalPos;
  23. /// <summary>
  24. /// Entity to spawn for the animation
  25. /// </summary>
  26. public string? Animation;
  27. public MeleeLungeEvent(NetEntity entity, NetEntity weapon, Angle angle, Vector2 localPos, string? animation)
  28. {
  29. Entity = entity;
  30. Weapon = weapon;
  31. Angle = angle;
  32. LocalPos = localPos;
  33. Animation = animation;
  34. }
  35. }