17 lines
335 B
C#
17 lines
335 B
C#
using Godot;
|
|
|
|
|
|
[GlobalClass]
|
|
public abstract partial class DroppableItem : Area2D
|
|
{
|
|
[Signal] public delegate void PickedUpEventHandler();
|
|
public override void _InputEvent(Viewport viewport, InputEvent @event, int shapeIdx)
|
|
{
|
|
if (@event.IsActionPressed("primary_action"))
|
|
{
|
|
PickUp();
|
|
}
|
|
}
|
|
public abstract void PickUp();
|
|
|
|
}
|