[gd_scene load_steps=8 format=3 uid="uid://4gxhnql5bjk6"]

[ext_resource type="Texture2D" uid="uid://50hm4xgnw8ks" path="res://Assets/Sprites/Tilesets/Tracks.png" id="1_84p4k"]
[ext_resource type="Script" uid="uid://chhr6kgvstkod" path="res://Scripts/Classes/Entities/Objects/TrackPiece.gd" id="1_t2c2l"]
[ext_resource type="Texture2D" uid="uid://barofu3g8jf00" path="res://Assets/Sprites/Tilesets/InvisibleTracks.png" id="2_5cc87"]
[ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_4ie33"]
[ext_resource type="JSON" path="res://Assets/Sprites/Tilesets/Track.json" id="4_5cc87"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_4k6gi"]
size = Vector2(12, 12)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_5xalo"]
size = Vector2(12, 12)

[node name="TrackPiece" type="Node2D"]
physics_interpolation_mode = 2
script = ExtResource("1_t2c2l")

[node name="Start" type="Sprite2D" parent="."]
texture = ExtResource("2_5cc87")
region_enabled = true
region_rect = Rect2(64, 16, 16, 16)
region_filter_clip_enabled = true

[node name="Connect" type="Sprite2D" parent="."]
texture = ExtResource("2_5cc87")
region_enabled = true
region_rect = Rect2(64, 16, 16, 16)
region_filter_clip_enabled = true

[node name="End" type="Sprite2D" parent="."]
texture = ExtResource("1_84p4k")
hframes = 2
frame = 1
region_enabled = true
region_rect = Rect2(0, 16, 32, 16)

[node name="Hitbox" type="Area2D" parent="."]

[node name="Shape" type="CollisionShape2D" parent="Hitbox"]
shape = SubResource("RectangleShape2D_4k6gi")

[node name="PlacePreview" type="Node2D" parent="."]
z_index = 1

[node name="NW" type="Sprite2D" parent="PlacePreview"]
position = Vector2(-16, -16)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/NW"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/NW/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/NW" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="N" type="Sprite2D" parent="PlacePreview"]
position = Vector2(0, -16)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/N"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/N/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/N" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="NE" type="Sprite2D" parent="PlacePreview"]
position = Vector2(16, -16)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/NE"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/NE/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/NE" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="E" type="Sprite2D" parent="PlacePreview"]
position = Vector2(16, 0)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/E"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/E/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/E" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="SE" type="Sprite2D" parent="PlacePreview"]
position = Vector2(16, 16)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/SE"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/SE/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/SE" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="S" type="Sprite2D" parent="PlacePreview"]
position = Vector2(0, 16)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/S"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/S/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/S" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="SW" type="Sprite2D" parent="PlacePreview"]
position = Vector2(-16, 16)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/SW"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/SW/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/SW" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[node name="W" type="Sprite2D" parent="PlacePreview"]
position = Vector2(-16, 0)
texture = ExtResource("1_84p4k")
hframes = 2
region_enabled = true
region_rect = Rect2(32, 16, 32, 16)

[node name="MouseArea" type="Area2D" parent="PlacePreview/W"]

[node name="Shape" type="CollisionShape2D" parent="PlacePreview/W/MouseArea"]
shape = SubResource("RectangleShape2D_5xalo")

[node name="ResourceSetterNew" type="Node" parent="PlacePreview/W" node_paths=PackedStringArray("node_to_affect")]
script = ExtResource("3_4ie33")
node_to_affect = NodePath("..")
property_name = "texture"
mode = 1
resource_json = ExtResource("4_5cc87")
metadata/_custom_type_script = "uid://cbal8ms2oe1ik"

[connection signal="mouse_entered" from="PlacePreview/NW/MouseArea" to="." method="on_mouse_entered"]
[connection signal="mouse_exited" from="PlacePreview/NW/MouseArea" to="." method="on_mouse_exited"]
[connection signal="mouse_entered" from="PlacePreview/N/MouseArea" to="." method="on_mouse_entered" binds= [1]]
[connection signal="mouse_exited" from="PlacePreview/N/MouseArea" to="." method="on_mouse_exited" binds= [1]]
[connection signal="mouse_entered" from="PlacePreview/NE/MouseArea" to="." method="on_mouse_entered" binds= [2]]
[connection signal="mouse_exited" from="PlacePreview/NE/MouseArea" to="." method="on_mouse_exited" binds= [2]]
[connection signal="mouse_entered" from="PlacePreview/E/MouseArea" to="." method="on_mouse_entered" binds= [3]]
[connection signal="mouse_exited" from="PlacePreview/E/MouseArea" to="." method="on_mouse_exited" binds= [3]]
[connection signal="mouse_entered" from="PlacePreview/SE/MouseArea" to="." method="on_mouse_entered" binds= [4]]
[connection signal="mouse_exited" from="PlacePreview/SE/MouseArea" to="." method="on_mouse_exited" binds= [4]]
[connection signal="mouse_entered" from="PlacePreview/S/MouseArea" to="." method="on_mouse_entered" binds= [5]]
[connection signal="mouse_exited" from="PlacePreview/S/MouseArea" to="." method="on_mouse_exited" binds= [5]]
[connection signal="mouse_entered" from="PlacePreview/SW/MouseArea" to="." method="on_mouse_entered" binds= [6]]
[connection signal="mouse_exited" from="PlacePreview/SW/MouseArea" to="." method="on_mouse_exited" binds= [6]]
[connection signal="mouse_entered" from="PlacePreview/W/MouseArea" to="." method="on_mouse_entered" binds= [7]]
[connection signal="mouse_exited" from="PlacePreview/W/MouseArea" to="." method="on_mouse_exited" binds= [7]]
