You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As there are many classes in the current project, and most of them aren't directly related to one another, custom events can't be transmitted in many scenarios without an EventDispatcher that is able to work on all classes.
Therefore, a new singleton class that manages the dispatching and listening to events to any class who has an instance of it, is needed to solve the problem cleanly.
The text was updated successfully, but these errors were encountered:
The solution consists in 2 classes: util.EventManager (which is a class that extends from EventDispatcher giving it the structure of a Singleton) ad util.EvCodes which acts as an Enum for defining custom event codes.
As there are many classes in the current project, and most of them aren't directly related to one another, custom events can't be transmitted in many scenarios without an EventDispatcher that is able to work on all classes.
Therefore, a new singleton class that manages the dispatching and listening to events to any class who has an instance of it, is needed to solve the problem cleanly.
The text was updated successfully, but these errors were encountered: