21 lines
364 B
GDScript
21 lines
364 B
GDScript
extends Label
|
|
|
|
@export var type:int=0
|
|
@export var texture:TextureRect
|
|
var item_data:Dictionary
|
|
|
|
func _can_drop_data(at_position: Vector2, data: Variant) -> bool:
|
|
if data.has("type") and data["type"]==type:
|
|
return true
|
|
else:
|
|
return false
|
|
func _drop_data(at_position: Vector2, data: Variant) -> void:
|
|
if item_data!=null:
|
|
|
|
pass
|
|
item_data=data
|
|
|
|
|
|
|
|
pass
|