37 lines
832 B
C#
37 lines
832 B
C#
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Flash
|
|
{
|
|
[RegisterComponent, NetworkedComponent]
|
|
public sealed class FlashableComponent : Component
|
|
{
|
|
public float Duration;
|
|
public TimeSpan LastFlash;
|
|
|
|
public override bool SendOnlyToOwner => true;
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class FlashableComponentState : ComponentState
|
|
{
|
|
public float Duration { get; }
|
|
public TimeSpan Time { get; }
|
|
|
|
public FlashableComponentState(float duration, TimeSpan time)
|
|
{
|
|
Duration = duration;
|
|
Time = time;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum FlashVisuals : byte
|
|
{
|
|
BaseLayer,
|
|
LightLayer,
|
|
Burnt,
|
|
Flashing,
|
|
}
|
|
}
|