droppable items and win
This commit is contained in:
parent
0f6445d677
commit
5bdbfa4d82
47 changed files with 820 additions and 85 deletions
17
scripts/droppable-items/DroppableItem.cs
Normal file
17
scripts/droppable-items/DroppableItem.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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();
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue