Say I want to make my own event listener for my class, how do I do that? Do I need to maintain a thread manually?
I found this tutorial to be VERY HELPFUL. It explains the four steps to using a custom listener to manage callbacks in your code:
1.Define an interface as an event contract with methods that define events and arguments which are relevant event data.
2.Setup a listener member variable and setter in the child object which can be assigned an implementation of the interface.
3.Owner passes in a listener which implements the interface and handles the events from the child object.
4.Trigger events on the defined listener when the object wants to communicate events to it's owner
Hope it helps!