Listen for a game event and execute a function when it occurs
Kind of game event to listen for
Function to call when the game event occurs. Will get the event data as an argument.
PrivatedispatchDispatch a game event
Kind of game event to dispatch
Optionaldata: TEvent data to send along with the dispatch
Service to allow components to communicate with eachother through events