28 lines
801 B
C#
28 lines
801 B
C#
using System.Numerics;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Jittering;
|
|
|
|
[Access(typeof(SharedJitteringSystem))]
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class JitteringComponent : Component
|
|
{
|
|
[AutoNetworkedField]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float Amplitude { get; set; }
|
|
|
|
[AutoNetworkedField]
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float Frequency { get; set; }
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public Vector2 LastJitter { get; set; }
|
|
|
|
/// <summary>
|
|
/// The offset that an entity had before jittering started,
|
|
/// so that we can reset it properly.
|
|
/// </summary>
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public Vector2 StartOffset = Vector2.Zero;
|
|
}
|