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

[ext_resource type="Script" path="res://scripts/shop.gd" id="1_h51g3"]
[ext_resource type="PackedScene" uid="uid://bpkffb4ww8y1m" path="res://scenes/item.tscn" id="2_h1qhl"]
[ext_resource type="Texture2D" uid="uid://c7mn6cfykqmq3" path="res://sprites/shop.png" id="2_y2xf4"]
[ext_resource type="PackedScene" uid="uid://dpwqurhly8osd" path="res://scenes/interactible_manager.tscn" id="4_3g8xt"]
[ext_resource type="PackedScene" uid="uid://sk2uc8hcxhcj" path="res://scenes/physical_dialogue.tscn" id="5_o6r5s"]

[sub_resource type="CircleShape2D" id="CircleShape2D_put5l"]
radius = 389.155

[sub_resource type="RectangleShape2D" id="RectangleShape2D_sdg4f"]
size = Vector2(409, 181)

[node name="Shop" type="Area2D"]
script = ExtResource("1_h51g3")
text = "I sell nice items here"
ItemScenes = Array[PackedScene]([ExtResource("2_h1qhl")])

[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_y2xf4")
metadata/_edit_lock_ = true

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(8, 150)
shape = SubResource("CircleShape2D_put5l")

[node name="Wall" type="StaticBody2D" parent="."]
position = Vector2(-4, 149)

[node name="CollisionShape2D" type="CollisionShape2D" parent="Wall"]
position = Vector2(7.5, 15.5)
shape = SubResource("RectangleShape2D_sdg4f")
metadata/_edit_lock_ = true

[node name="InteractibleManager" parent="." node_paths=PackedStringArray("ItemShown") instance=ExtResource("4_3g8xt")]
ItemShown = NodePath("../Dialogue")

[node name="Dialogue" parent="." instance=ExtResource("5_o6r5s")]
DefaultText = "You can buy very nice items here"

[connection signal="body_entered" from="." to="InteractibleManager" method="_on_body_entered"]
[connection signal="body_exited" from="." to="InteractibleManager" method="_on_body_exited"]
