In my game I had implemented a system in gdscript where you could check what kind of area the player got in contact.
Area2D script:
var areaType = "Item"
or
var areaType = "Bullet"
and I could do something like this in my player script:
func on_player_area_entered():
if "areaType" in area:
if area.areaType =="Item":
# get drop
elif area.areaType =="Bullet":
#suffer damage
Now I am trying to repplicate this in c#, how can I do it??
sorry for not perfect english.