mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-25 17:44:24 +00:00
19 lines
320 B
GDScript
19 lines
320 B
GDScript
@icon("res://behaviours/draggable.svg")
|
|
extends Area2D
|
|
class_name Draggable
|
|
|
|
|
|
signal dragged(cursor: Cursor)
|
|
signal dropped(cursor: Cursor)
|
|
|
|
|
|
var being_dragged: bool = false
|
|
|
|
|
|
func drag(cursor: Cursor):
|
|
being_dragged = true
|
|
dragged.emit(cursor)
|
|
|
|
func drop(cursor: Cursor):
|
|
being_dragged = false
|
|
dropped.emit(cursor)
|