|
| | EventData (string eventName) |
| | The constructor used to create a new EventData More...
|
| |
| void | Add (EventData< T, U >.OnEvent evt) |
| | Add a method to be run when the EventData is fired. More...
|
| |
| void | Fire (T data0, U data1) |
| | Triggers the EventData More...
|
| |
| void | Remove (EventData< T, U >.OnEvent evt) |
| | Remove a method from the list of methods to be run when the EventData is fired. More...
|
| |
| delegate void | OnEvent (T data0, U data1) |
| | Any methods added to the event must match the delegate's parameters; two parameters of the given types in this case. More...
|
| |
|
| static bool | AddEventScene (string eventName, EventData< T, U >.OnEvent evt, bool addToAll) |
| |
| static bool | AddEventUpwards (Transform transform, string eventName, EventData< T, U >.OnEvent evt, bool addToAll) |
| |
| static EventData< T, U > | FindEventScene (string eventName) |
| |
| static List< EventData< T, U > > | FindEventsScene (string eventName) |
| |
| static List< EventData< T, U > > | FindEventsUpwards (Transform transform, string eventName) |
| |
| static EventData< T, U > | FindEventUpwards (Transform transform, string eventName) |
| |
| static bool | RemoveEventScene (string eventName, EventData< T, U >.OnEvent evt, bool removeFromAll) |
| |
| static bool | RemoveEventUpwards (Transform transform, string eventName, EventData< T, U >.OnEvent evt, bool removeFromAll) |
| |
A type used to generate GameEvents
Use this type with two accompanying parameters
- Template Parameters
-
| T | The first type to be passed through on EventData.Fire() |
| U | The second type to be passed through on EventData.Fire() |
Add a method to be run when the EventData is fired.
This is generally done in an object's Start or Awake method, or a class' constructor.
Can be setup like:
GameEvents.someEventDataEvent.Add(yourMethod);
or
GameEvents.someEventDataEvent.Add(new EventVoid.OnEvent(yourMethod));
- Parameters
-
| evt | The method you want to add; must contain two parameters of types matching those in the host EventData |