signals godot code example
Example 1: connect signal godot
Awesome response by @Zwazel for code connection, but remember that you can connect
via the visual interface by:
1. Going to the node that emits the signal
2. Click Node section
3. Choose the signal and click connect
4. Now choose the node to be connected and func name
Example 2: hwo to fire custom signal in godot
signal is_a_signal
if isasignal:
emit_signal(is_a_signal)
Example 3: custom signal godot
extends Node2D
signal my_signal
func _ready():
emit_signal("my_signal")