Closed lorenalexm closed 1 month ago
Would you mind asking questions on the Discussion page, rather than the issues page?
I am closing here, and if we find a bug, we can move that bug here.
Oh crap! Completely forgot there was even a discussion section; my apologies!
I know this is a bit more of a Godot issue and a bit less of a SwiftGodot one, so I apologize for that. Historically with other engines I have used a bespoke Event/Message broker to inform objects in a decoupled way. In migrating to (Swift)Godot I am trying to utilize its way of doing things.
Signals.
I have two classes (trimmed for clarity) with one declaring the signal, and another attempting to connect to that signal. When running the project, the console reports that the declared signal is a nonexistent one and of course the
onCoinCollected
function is never called. I have seen in issue #254 that it seems we need to couple our classes to correctly connect to a signal? In this case having theGameInterface
class@Export
a property to reference thePlayer
.Is this correct thinking on my part? Are we truly needing to pass references around to connect to a signal?
Thanks!