File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public class GenericSignal<each T: VariantStorable> {
26
26
/// - flags: Optional, can be also added to configure the connection's behavior (see ``Object/ConnectFlags`` constants).
27
27
/// - Returns: an object token that can be used to disconnect the object from the target on success, or the error produced by Godot.
28
28
///
29
- @discardableResult /* Signal1 */
29
+ @discardableResult
30
30
public func connect( flags: Object . ConnectFlags = [ ] , _ callback: @escaping ( _ t: repeat each T ) -> Void ) -> Object {
31
31
let signalProxy = SignalProxy ( )
32
32
signalProxy. proxy = { args in
@@ -46,6 +46,11 @@ public class GenericSignal<each T: VariantStorable> {
46
46
target. disconnect ( signal: signalName, callable: Callable ( object: token, method: SignalProxy . proxyName) )
47
47
}
48
48
49
+ /// Emit the signal (with required arguments, if there are any)
50
+ public func emit( _ t: repeat each T ) {
51
+ target. emitSignal ( signalName, repeat each t)
52
+ }
53
+
49
54
/// You can await this property to wait for the signal to be emitted once.
50
55
public var emitted : Void {
51
56
get async {
You can’t perform that action at this time.
0 commit comments