mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-07 02:08:17 +02:00
28 lines
641 B
C#
28 lines
641 B
C#
using JetBrains.Annotations;
|
|
|
|
namespace Robust.Shared.GameObjects
|
|
{
|
|
[UsedImplicitly]
|
|
public class SnapGridSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<SnapGridComponent, MoveEvent>(OnMoveEvent);
|
|
}
|
|
|
|
public override void Shutdown()
|
|
{
|
|
base.Shutdown();
|
|
|
|
UnsubscribeLocalEvent<SnapGridComponent, MoveEvent>(OnMoveEvent);
|
|
}
|
|
|
|
private void OnMoveEvent(EntityUid uid, SnapGridComponent snapGrid, MoveEvent args)
|
|
{
|
|
snapGrid.UpdatePosition();
|
|
}
|
|
}
|
|
}
|