1
0

RotationVisualsComponent.cs 953 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Serialization;
  3. namespace Content.Shared.Rotation;
  4. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  5. public sealed partial class RotationVisualsComponent : Component
  6. {
  7. /// <summary>
  8. /// Default value of <see cref="HorizontalRotation"/>
  9. /// </summary>
  10. [DataField]
  11. public Angle DefaultRotation = Angle.FromDegrees(90);
  12. [DataField]
  13. public Angle VerticalRotation = 0;
  14. [DataField, AutoNetworkedField]
  15. public Angle HorizontalRotation = Angle.FromDegrees(90);
  16. [DataField]
  17. public float AnimationTime = 0.125f;
  18. }
  19. [Serializable, NetSerializable]
  20. public enum RotationVisuals
  21. {
  22. RotationState
  23. }
  24. [Serializable, NetSerializable]
  25. public enum RotationState
  26. {
  27. /// <summary>
  28. /// Standing up. This is the default value.
  29. /// </summary>
  30. Vertical = 0,
  31. /// <summary>
  32. /// Laying down
  33. /// </summary>
  34. Horizontal,
  35. }