DragDropUI added to world

This commit is contained in:
Streamfire
2020-04-19 15:23:07 +02:00
parent f545fac18b
commit bf29417785
3 changed files with 43 additions and 10 deletions

View File

@@ -4,6 +4,7 @@
script/source = "extends Container
#DropZone
#stuff can be dropped here
func can_drop_data(_pos, data):
return typeof(data) == typeof(PackedScene)
@@ -12,7 +13,7 @@ func can_drop_data(_pos, data):
func drop_data(_pos, data:PackedScene):
var child = data.instance()
child.position= _pos
self.add_child(child)
get_node(get_parent().ObjectParent).add_child(child)
"
[node name="DragSink" type="Container"]