Event Manager
THE EVENT MANAGER
EventManager is a struct that takes care of triggering events for the right objects.
It manages the Event Listeners you add and it is the most important struct of the system.
Usually, only one instance needs to be created, however it is also possible to have multiple Event Managers that take care of handling events for different Event Types, but to keep things simple we only use one.
The EventManager struct requires you to specify its internal capacity or the maximum number of types of events it must handle: this cannot be changed lately and is necessary to make the system work in an efficient way.
PLEASE NOTE
To make the system work properly you also need to create a new EventManager instance in your Main Object, or the first object created in your room.
HOW TO SETUP THE EVENT MANAGER
Create Event
Begin Step Event
Clean Up Event
HOW TO TRIGGER AN EVENT
Let's assume we want to trigger the EventType.RedColor event.
HOW TO TRIGGER AN EVENT WITH CUSTOM DATA
Let's assume we want to trigger the EventType.CustomColor event with Custom Data.
Get Giavapps Event System
Giavapps Event System
Extension for GameMaker
More posts
- Event ListenerSep 27, 2020
- Event TypeSep 27, 2020