Godot 4.2.1 mono .NET
My objective is to create a signal inside the code instead of using the godot gui, this way i can create a default hurtbox script that i can use easely in varius aspectes of my game.
I got the following errors on the line marked:
CS1503: Argument 2: cannot convert from ‘defaulthurtbox’ to 'Godot.Callable
CS1503: Argument 3: cannot convert from ‘string’ to ‘uint’
using Godot;
using System;public partial class defaulthurtbox : Area2D
{
public override void _Ready()
{
GD.Print(Owner);
Connect(“area_entered”, this, nameof(_on_area_entered));
}
private void _on_area_entered(defaulthitbox hitbox)
{
GD.Print(“Bateste no Mob”);
if (hitbox == null)
{
return;
}
}
}
I watched some youtume videos and some people have their code exactly like this and mine dosent work, can someone help?