Event Bus implementation for Godot Engine. Removes the need to explicitly connect signals to nodes - the only thing you need right now is a reference (global or scene-local) to event bus instance and you're good to go!
- Create addons directory under root of your Godot project
- Inside addons run:
git submodule add https://github.com/Naata/godot-event-bus
Use event_bus.gd script as Singleton in AutLoad:
Add EventBus node to your scene:
- You can decide when event processing takes place:
- Idle - inside
_process(delta)
function - Physics - inside
_physics_process_delta
function
- Idle - inside
- Also you can decide how many events will be processed during single invocation (default is 1).