I have encountered some problems: in GDScript, it is easy to link the signal of B in A(A.abc.connect(b)), but I am using C #. How can I implement this function. I reported an error in the code below
`public partial class GameEvents : Node
{
[Signal]
public delegate void GameEventsExpManagerEventHandler(float number);
public override void _Ready()
{
this.GameEventsExpManager += EmitExperivalCollected;
}
public void EmitExperivalCollected(float number){
GD.Print("do something...");
}}`
`public partial class ExperienceVial : Node2D
{
private void OnAreaEntered(Area2D area2D){
EmitSignal(GameEvents.SignalName.GameEventsExpManager,1.0f);
this.QueueFree();
}
public override void _Ready()
{
GetNode<Area2D>("Area2D").AreaEntered += OnAreaEntered;
}
}
`
error:E 0:00:06:0834 NativeCalls.cs:6254 @ int Godot.NativeCalls.godot_icall_2_699(nint, nint, Godot.NativeInterop.godot_string_name, Godot.Variant[], Godot.NativeInterop.godot_string_name): Can't emit non-existing signal "GameEventsExpManager".
<C++ 错误> Condition "!signal_is_valid && !script.is_null() && !Ref<Script>(script)->has_script_signal(p_name)" is true. Returning: ERR_UNAVAILABLE
<C++ 源文件> core/object/object.cpp:1083 @ emit_signalp()
<栈追踪> NativeCalls.cs:6254 @ int Godot.NativeCalls.godot_icall_2_699(nint, nint, Godot.NativeInterop.godot_string_name, Godot.Variant[], Godot.NativeInterop.godot_string_name)
GodotObject.cs:602 @ Godot.Error Godot.GodotObject.EmitSignal(Godot.StringName, Godot.Variant[])
ExperienceVial.cs:10 @ void ExperienceVial.OnAreaEntered(Godot.Area2D)
Area2D.cs:739 @ void Godot.Area2D.AreaEnteredTrampoline(object, Godot.NativeInterop.NativeVariantPtrArgs, Godot.NativeInterop.godot_variant&)
DelegateUtils.cs:62 @ void Godot.DelegateUtils.InvokeWithVariantArgs(nint, System.Void, Godot.NativeInterop.godot_variant**, int, Godot.NativeInterop.godot_variant)
Is using event delegation? How should I use C # event delegation to complete?