Signals
Use the delegate signal
to create a signal and annotate it with @RegisterSignal
. Note that the name of the signal must start with signal
(see API differences section for an explanation). This module only supports signals with at most 10 parameters at the moment.
1 2 3 4 5 |
|
Naming
For consistency with Godot's style, the signal
prefix is dropped during registration and the name of your signal is converted to snake_case. The signal signalHelloThere
is known as hello_there
in GDScript.
Emitting
Every signal has a emit
method which can be used to emit it in a typesafe way.
1 |
|
Subscribing
A method can be subscribed/connected to a signal via connect
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|