ReloadHandler.cs 453 B

123456789101112131415161718192021222324
  1. using Component;
  2. namespace Logic
  3. {
  4. [HandlerAttribute(1)]
  5. class ReloadHandlerHandler : IHandler
  6. {
  7. public void Handle(MessageEnv messageEnv, byte[] content)
  8. {
  9. var world = messageEnv.Get<World.World>();
  10. world.ReloadLogic();
  11. }
  12. }
  13. [HandlerAttribute(2)]
  14. class ReloadConfigHandler: IHandler
  15. {
  16. public void Handle(MessageEnv messageEnv, byte[] content)
  17. {
  18. var world = messageEnv.Get<World.World>();
  19. world.ReloadConfig();
  20. }
  21. }
  22. }