jakub,
@jakub@lewacki.space avatar

oop signals in #godot look so cool

tartley,
@tartley@mastodon.social avatar

@jakub I am inexperienced in Godot but when I started using signals I wish I had known:

Objects I want to receive a signal often did not have a reference to the object sending the signal, so could not subscribe to it.

To solve it, notice that objects can raise a signal which is defined on a completely different class. Hence, one pattern is to have a single well known MessageBus instance, which defines all the signals, which anything can raise, and anything can subscribe to.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • godot
  • ethstaker
  • DreamBathrooms
  • cubers
  • osvaldo12
  • mdbf
  • magazineikmin
  • normalnudes
  • InstantRegret
  • rosin
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • JUstTest
  • everett
  • cisconetworking
  • tacticalgear
  • anitta
  • thenastyranch
  • Durango
  • tester
  • GTA5RPClips
  • modclub
  • megavids
  • provamag3
  • Leos
  • lostlight
  • All magazines