* Oops! All Changes In One Commit * try desperately to fix prediction issues and fail * oops * test * actually fixes prediction issues * port jittering to status effect * default merge behavior + alert cooldown stuff * silly test issue * zabloing * address reviews
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System;
|
|
using Robust.Shared.Analyzers;
|
|
using Robust.Shared.GameObjects;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Maths;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Content.Shared.Jittering
|
|
{
|
|
[Friend(typeof(SharedJitteringSystem))]
|
|
[RegisterComponent, NetworkedComponent]
|
|
public class JitteringComponent : Component
|
|
{
|
|
public override string Name => "Jittering";
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float Amplitude { get; set; }
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public float Frequency { get; set; }
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public Vector2 LastJitter { get; set; }
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public class JitteringComponentState : ComponentState
|
|
{
|
|
public float Amplitude { get; }
|
|
public float Frequency { get; }
|
|
|
|
public JitteringComponentState(float amplitude, float frequency)
|
|
{
|
|
Amplitude = amplitude;
|
|
Frequency = frequency;
|
|
}
|
|
}
|
|
}
|