public void Subscribe <T>(Action <T> act)
 {
     World.Subscribe(EventSubscription.Create <T>((e) => _actions.Add(() => act(e)), this));
 }
Exemple #2
0
 public static void Subscribe <T>(Action <T> onEvent, object owner)
 {
     Subscribe(EventSubscription.Create <T>(onEvent, owner));
 }
Exemple #3
0
 public static void Subscribe(EventSubscription subscription)
 {
     TransientEvents.Subscribe(subscription);
     EventSubs.Add(subscription);
     Resources.Put(subscription.GetHashCode().ToString(), subscription);
 }
Exemple #4
0
 public static void SubscribeForever(EventSubscription subscription)
 {
     PersistentEvents.Subscribe(subscription);
 }