1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-22 08:04:23 +00:00
hella-farm/behaviours/draggable.gd

20 lines
284 B
GDScript3
Raw Normal View History

2024-04-16 01:56:46 +00:00
@icon("res://behaviours/draggable.svg")
extends Area2D
class_name Draggable
signal dragged(cursor: Cursor)
2024-04-20 02:31:59 +00:00
signal dropped
2024-04-16 01:56:46 +00:00
var being_dragged: bool = false
func drag(cursor: Cursor):
being_dragged = true
dragged.emit(cursor)
2024-04-20 02:31:59 +00:00
func drop():
being_dragged = false
2024-04-20 02:31:59 +00:00
dropped.emit()