Files
tbd-station-14/Content.Shared/Movement/Components/SpriteMovementComponent.cs
metalgearsloth 9a40cf81f5 Add sprite movement states (#22940)
* Add sprite movement states

Did it for borgs for reference for future implementations.

* Fix

* Fix prediction issue

* review
2023-12-24 23:34:21 -08:00

23 lines
662 B
C#

using Robust.Shared.GameStates;
namespace Content.Shared.Movement.Components;
/// <summary>
/// Updates a sprite layer based on whether an entity is moving via input or not.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class SpriteMovementComponent : Component
{
/// <summary>
/// Layer and sprite state to use when moving.
/// </summary>
[DataField]
public Dictionary<string, PrototypeLayerData> MovementLayers = new();
/// <summary>
/// Layer and sprite state to use when not moving.
/// </summary>
[DataField]
public Dictionary<string, PrototypeLayerData> NoMovementLayers = new();
}