Methods
StateClass:registerEvent(event: string, func: function?)
Register an event for this class.
@param event — The name of the event to register.
@param func — The class function to register for the event. If not provided, gets the function with the same name as the event.
Arguments:
| event: string | The name of the event to register. |
| func: function? | The class function to register for the event. If not provided, gets the function with the same name as the event. |