You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
365 B
16 lines
365 B
using Godot;
|
|
|
|
namespace Babushka.scripts.CSharp.Common.Util;
|
|
|
|
public partial class ClickDetect : Area2D
|
|
{
|
|
[Signal] public delegate void ClickEventHandler();
|
|
|
|
public override void _Input(InputEvent evt)
|
|
{
|
|
if (evt is InputEventMouseButton { ButtonIndex: MouseButton.Left, Pressed: true })
|
|
{
|
|
EmitSignalClick();
|
|
}
|
|
}
|
|
} |