Skip to content
#

event-dispatcher

Here are 99 public repositories matching this topic...

RelicOfTesla
RelicOfTesla commented Mar 24, 2021
func makeFn(a int) event.ListenerFunc {
	return func(e event.Event) error {
		fmt.Println(a)
		return nil
	}
}
func main() {
	evBus := event.NewManager("")
	f1 := makeFn(11)
	evBus.On("evt1", f1)
	f2 := makeFn(22)
	evBus.On("evt1", f2)
	evBus.RemoveListener("evt1", f1) // DON'T REMOVE ALL !!!
	evBus.MustFire("evt1", event.M{"arg0": "val0", "arg1": "val1"})
}

Project was created in 1 week. The goal of the project was to demonstrate proper blueprint structure for a variety of systems. It includes things such as an Inventory/Item System, Interactable System, Point System with Save Game, various World Enemies such as a frogger-style highway with random generation based on settings, and more. Full list of features available in the Wiki

  • Updated Feb 7, 2021

Improve this page

Add a description, image, and links to the event-dispatcher topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the event-dispatcher topic, visit your repo's landing page and select "manage topics."

Learn more