2023-07-08 14:08:32 +10:00
|
|
|
using System.Numerics;
|
2023-01-17 18:01:53 -04:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Gravity;
|
|
|
|
|
|
2023-09-28 16:20:29 -07:00
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
2023-01-17 18:01:53 -04:00
|
|
|
[Access(typeof(SharedFloatingVisualizerSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class FloatingVisualsComponent : Component
|
2023-01-17 18:01:53 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long it takes to go from the bottom of the animation to the top.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-09-28 16:20:29 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-01-17 18:01:53 -04:00
|
|
|
public float AnimationTime = 2f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How far it goes in any direction.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-09-28 16:20:29 -07:00
|
|
|
[DataField, AutoNetworkedField]
|
2023-01-17 18:01:53 -04:00
|
|
|
public Vector2 Offset = new(0, 0.2f);
|
|
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-09-28 16:20:29 -07:00
|
|
|
[AutoNetworkedField]
|
2023-01-17 18:01:53 -04:00
|
|
|
public bool CanFloat = false;
|
|
|
|
|
|
2023-09-28 16:20:29 -07:00
|
|
|
public readonly string AnimationKey = "gravity";
|
2023-01-17 18:01:53 -04:00
|
|
|
}
|