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.
Private
dispatchDispatch a game event
Kind of game event to dispatch
Optional
data: TEvent data to send along with the dispatch
Service to allow components to communicate with eachother through events