Area2D area_entered equivalent in C#

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Memorix101

I’m looking for an area_entered equivalent in C#


func _on_Area2D_body_enter(other):

in C#

:bust_in_silhouette: Reply From: kidscancode

area_enteredis a signal. Signals can be connected to any function. If you use the editor to automatically create a receiving function, it will follow the scheme _on_nodeName_signal_name(). Otherwise you can create the function like any other C# function and connect the signal to it either via the editor or in code.

public void OnArea2DAreaEntered(Area2D area)
    // your code here

See the Signals tutorial for details.

enter image description here

enter image description here

Great! Thanks!

Memorix101 | 2019-09-25 01:26