1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-25 09:34:24 +00:00

Make Draggable an Area2D consisting of the mouse target

This commit is contained in:
Steffo 2024-04-14 07:21:24 +02:00
parent e434ae69bf
commit 6df6455505
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 10 additions and 3 deletions

View file

@ -1,4 +1,4 @@
extends Node
extends Area2D
class_name Draggable

View file

@ -1,6 +1,13 @@
[gd_scene load_steps=2 format=3 uid="uid://dijcjahkddudv"]
[gd_scene load_steps=3 format=3 uid="uid://dijcjahkddudv"]
[ext_resource type="Script" path="res://behaviours/draggable.gd" id="1_hdedq"]
[node name="Draggable" type="Node"]
[sub_resource type="CircleShape2D" id="CircleShape2D_vkph8"]
radius = 8.0
[node name="Draggable" type="Area2D"]
script = ExtResource("1_hdedq")
[node name="Shape" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_vkph8")
debug_color = Color(1, 1, 1, 0)