mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
* Removed the Interfaces folder. * All objects inside the GameObjects subfolders are now in the GameObjects namespace. * Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces. * Simplified Robust.client.Graphics namespace. * Automated remove redundant using statements.
21 lines
473 B
C#
21 lines
473 B
C#
namespace Robust.Shared.GameObjects
|
|
{
|
|
public class SnapGridSystem : EntitySystem
|
|
{
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<MoveEvent>(OnMoveEvent);
|
|
}
|
|
|
|
private void OnMoveEvent(MoveEvent @event)
|
|
{
|
|
if (@event.Sender.TryGetComponent(out SnapGridComponent? snapGrid))
|
|
{
|
|
snapGrid.UpdatePosition();
|
|
}
|
|
}
|
|
}
|
|
}
|