public void Publish() { var testMessage = new TestMessageEvent { Message = "Publish test" }; _eventBus.Publish(testMessage); }
public void Handle(TestMessageEvent @event) { try { Console.WriteLine(@event.Message); } catch (Exception e) { Console.WriteLine(e); throw; } }
private void OnTestMessageEvent(IEventBase obj) { TestMessageEvent e = (TestMessageEvent)obj; Debug.Log(e.msg); }