From e434ae69bf99698920996156cd5826e3c696ca04 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 14 Apr 2024 07:20:53 +0200 Subject: [PATCH] Make `Sheep` `Draggable` --- entities/sheep.tscn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entities/sheep.tscn b/entities/sheep.tscn index e042e2e..84e50fe 100644 --- a/entities/sheep.tscn +++ b/entities/sheep.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=5 format=3 uid="uid://bc2bm8lbol18w"] +[gd_scene load_steps=6 format=3 uid="uid://bc2bm8lbol18w"] [ext_resource type="Script" path="res://entities/sheep.gd" id="1_4dmll"] [ext_resource type="PackedScene" uid="uid://bvrxvrjlo5130" path="res://behaviours/move_towards_mouse.tscn" id="2_tfd2i"] +[ext_resource type="PackedScene" uid="uid://dijcjahkddudv" path="res://behaviours/draggable.tscn" id="3_8ku7r"] [sub_resource type="CircleShape2D" id="CircleShape2D_c5tcn"] radius = 16.0 @@ -23,4 +24,6 @@ scale = Vector2(30, 30) speed = -20.0 can_detach = true +[node name="Draggable" parent="." instance=ExtResource("3_8ku7r")] + [connection signal="move" from="MoveTowardsMouse" to="." method="_on_move"]