summaryrefslogtreecommitdiff
path: root/Reusable Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'Reusable Scenes')
-rw-r--r--Reusable Scenes/number_node.tscn30
1 files changed, 23 insertions, 7 deletions
diff --git a/Reusable Scenes/number_node.tscn b/Reusable Scenes/number_node.tscn
index 7ab9497..9564505 100644
--- a/Reusable Scenes/number_node.tscn
+++ b/Reusable Scenes/number_node.tscn
@@ -1,4 +1,4 @@
-[gd_scene load_steps=5 format=3 uid="uid://ccvoi0qmvlxmj"]
+[gd_scene load_steps=7 format=3 uid="uid://ccvoi0qmvlxmj"]
[ext_resource type="Script" path="res://Scripts/NumberNode.gd" id="1_7p1bu"]
[ext_resource type="Texture2D" uid="uid://cckv0u0uvmp6p" path="res://icon.svg" id="2_d46p4"]
@@ -7,6 +7,12 @@
[sub_resource type="RectangleShape2D" id="RectangleShape2D_ld6aj"]
size = Vector2(66, 66)
+[sub_resource type="CircleShape2D" id="CircleShape2D_mh4p4"]
+radius = 29.41
+
+[sub_resource type="CircleShape2D" id="CircleShape2D_y33cg"]
+radius = 130.8
+
[node name="NumberNode" type="Node2D" node_paths=PackedStringArray("label", "label_modifier", "sprite", "sprite_modifier")]
script = ExtResource("1_7p1bu")
label = NodePath("Label")
@@ -14,6 +20,22 @@ label_modifier = NodePath("Label2")
sprite = NodePath("Sprite2D")
sprite_modifier = NodePath("Sprite2D2")
+[node name="Area2D" type="Area2D" parent="."]
+script = ExtResource("3_2viuw")
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
+shape = SubResource("RectangleShape2D_ld6aj")
+
+[node name="ShapeCast2D" type="ShapeCast2D" parent="."]
+shape = SubResource("CircleShape2D_mh4p4")
+target_position = Vector2(0, 0)
+collide_with_areas = true
+
+[node name="ShapeCast2D2" type="ShapeCast2D" parent="."]
+shape = SubResource("CircleShape2D_y33cg")
+target_position = Vector2(0, 0)
+collide_with_areas = true
+
[node name="Sprite2D" type="Sprite2D" parent="."]
modulate = Color(0, 0, 0, 1)
scale = Vector2(0.3, 0.3)
@@ -55,11 +77,5 @@ text = "X"
horizontal_alignment = 1
vertical_alignment = 1
-[node name="Area2D" type="Area2D" parent="."]
-script = ExtResource("3_2viuw")
-
-[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
-shape = SubResource("RectangleShape2D_ld6aj")
-
[connection signal="mouse_entered" from="Area2D" to="Area2D" method="_on_mouse_entered"]
[connection signal="mouse_exited" from="Area2D" to="Area2D" method="_on_mouse_exited"]