1
0

FloatingVisualsComponent.cs 856 B

1234567891011121314151617181920212223242526272829
  1. using System.Numerics;
  2. using Robust.Shared.GameStates;
  3. namespace Content.Shared.Gravity;
  4. [RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
  5. [Access(typeof(SharedFloatingVisualizerSystem))]
  6. public sealed partial class FloatingVisualsComponent : Component
  7. {
  8. /// <summary>
  9. /// How long it takes to go from the bottom of the animation to the top.
  10. /// </summary>
  11. [ViewVariables(VVAccess.ReadWrite)]
  12. [DataField, AutoNetworkedField]
  13. public float AnimationTime = 2f;
  14. /// <summary>
  15. /// How far it goes in any direction.
  16. /// </summary>
  17. [ViewVariables(VVAccess.ReadWrite)]
  18. [DataField, AutoNetworkedField]
  19. public Vector2 Offset = new(0, 0.2f);
  20. [ViewVariables(VVAccess.ReadWrite)]
  21. [AutoNetworkedField]
  22. public bool CanFloat = false;
  23. public readonly string AnimationKey = "gravity";
  24. }