Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

godot c# signal

private void _on_Area_input_event(object camera, object @event, Vector3 position, Vector3 normal, int shape_idx)
{
	if (@event.GetType() == typeof(Godot.InputEventMouseButton))
	{
		var thisEvent = (InputEventMouseButton)@event;
		if (thisEvent.Pressed)
		{
			GD.Print("Click!");
		}
		if (!thisEvent.Pressed)
		{
			GD.Print("Release!");
		}
	}
}
Source by www.reddit.com #
 
PREVIOUS NEXT
Tagged: #godot #signal
ADD COMMENT
Topic
Name
4+6 =