You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the GameInterface class @Export a property to reference the Player.
Is this correct thinking on my part? Are we truly needing to pass references around to connect to a signal?
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!
The text was updated successfully, but these errors were encountered: