Use EntitySystem proxies to (un)subscribe to event in BuckleSystem.

This commit is contained in:
Víctor Aguilera Puerto
2020-11-06 12:43:38 +01:00
parent bb3aee90b2
commit 089422fa99

View File

@@ -17,14 +17,14 @@ namespace Content.Server.GameObjects.EntitySystems
UpdatesAfter.Add(typeof(InteractionSystem)); UpdatesAfter.Add(typeof(InteractionSystem));
UpdatesAfter.Add(typeof(InputSystem)); UpdatesAfter.Add(typeof(InputSystem));
EntityManager.EventBus.SubscribeEvent<MoveEvent>(EventSource.Local, this, MoveEvent); SubscribeLocalEvent<MoveEvent>(MoveEvent);
} }
public override void Shutdown() public override void Shutdown()
{ {
base.Shutdown(); base.Shutdown();
EntityManager.EventBus.UnsubscribeEvent<MoveEvent>(EventSource.Local, this); UnsubscribeLocalEvent<MoveEvent>();
} }
private void MoveEvent(MoveEvent ev) private void MoveEvent(MoveEvent ev)