Skip to content

fwerner13/godot-event-bus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godot-event-bus

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!

Installation

  • Create addons directory under root of your Godot project
  • Inside addons run:

git submodule add https://github.com/Naata/godot-event-bus

  • Or simply unzip contents of this repository inside addons
  • Enable plugin inside Godot Editor: enable plugin

Usage

As global Event Bus

Use event_bus.gd script as Singleton in AutLoad: global event bus

As scene-local Event Bus

Add EventBus node to your scene: tree

Send and get some events!

Subscribe to event

subscribe

Publish event

publish

Customize

  • You can decide when event processing takes place:
    • Idle - inside _process(delta) function
    • Physics - inside _physics_process_delta function
  • Also you can decide how many events will be processed during single invocation (default is 1).

customizing

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published