Add sprite movement states (#22940)
* Add sprite movement states Did it for borgs for reference for future implementations. * Fix * Fix prediction issue * review
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user