Problem connecting signal to function using C# in Godot4
Hi,
I am trying to connect a signal of a InputEvent to a function in my C# code:
inst.GetNode<Area2D>("Area2D").InputEvent += tileclicked;
public void tileclicked(Viewport viewport, InputEvent @event, int shapeIdx)
{
GD.Print("Test");
}
inst
is a Node2D to which is attached a Area2D.When building I get the following warning:
No overload for 'tileclicked' matches delegate 'CollisionObject2D.InputEventEventHandler'
How do I proceed to connect the signal to a function and get all of the parameters ?
Thanks