mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
* FINALLY * Update animals.yml (cherry picked from commit f9ac956c0c1a79bc73984989c2b625c25b357ca1)
24 lines
604 B
C#
24 lines
604 B
C#
using Content.Shared.Movement.Components;
|
|
using Content.Shared.Movement.Events;
|
|
|
|
namespace Content.Shared.Movement.Systems;
|
|
|
|
public abstract class SharedSpriteMovementSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<SpriteMovementComponent, SpriteMoveEvent>(OnSpriteMoveInput);
|
|
}
|
|
|
|
private void OnSpriteMoveInput(Entity<SpriteMovementComponent> ent, ref SpriteMoveEvent args)
|
|
{
|
|
if (ent.Comp.IsMoving == args.IsMoving)
|
|
return;
|
|
|
|
ent.Comp.IsMoving = args.IsMoving;
|
|
Dirty(ent);
|
|
}
|
|
}
|