[gd_scene load_steps=29 format=3 uid="uid://biftfig0ysf1"]

[ext_resource type="Texture2D" uid="uid://j2c0uuvv7p8j" path="res://Resource/Image/background.png" id="1_qg3jl"]
[ext_resource type="Script" path="res://Script/shop.gd" id="1_wmgx1"]
[ext_resource type="Texture2D" uid="uid://bdegq2285vt2m" path="res://Resource/Image/child.png" id="2_0ptex"]
[ext_resource type="Texture2D" uid="uid://1424v8e3db4c" path="res://Resource/Image/adult.png" id="3_46waf"]
[ext_resource type="Script" path="res://Script/stock.gd" id="3_axra2"]
[ext_resource type="Script" path="res://Script/btn_mask.gd" id="3_bt6yy"]
[ext_resource type="Texture2D" uid="uid://rglpxnj5qnu6" path="res://Resource/Image/pay.png" id="7_icdl0"]
[ext_resource type="Script" path="res://Script/btn_buy.gd" id="7_ykhh4"]
[ext_resource type="Script" path="res://Script/cart.gd" id="9_fvoyk"]
[ext_resource type="AudioStream" uid="uid://cg1gdyetrum12" path="res://Resource/Sound/add.mp3" id="10_4wvu0"]
[ext_resource type="AudioStream" uid="uid://bhqvucll6glxg" path="res://Resource/Sound/minus.mp3" id="11_td32c"]
[ext_resource type="AudioStream" uid="uid://1jprc8y4ar2a" path="res://Resource/Sound/cashier.mp3" id="12_k5abp"]
[ext_resource type="AudioStream" uid="uid://d0vw5pjrud2sr" path="res://Resource/Sound/time_up.mp3" id="13_ynmxe"]
[ext_resource type="AudioStream" uid="uid://btqux3mxvf35n" path="res://Resource/Sound/btn_click.mp3" id="14_v12yb"]

[sub_resource type="AtlasTexture" id="AtlasTexture_a1nid"]
atlas = ExtResource("3_46waf")
region = Rect2(64, 104, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_y4l2s"]
atlas = ExtResource("3_46waf")
region = Rect2(48, 320, 104, 72)

[sub_resource type="AtlasTexture" id="AtlasTexture_4ur8f"]
atlas = ExtResource("3_46waf")
region = Rect2(208, 104, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_hl15y"]
atlas = ExtResource("3_46waf")
region = Rect2(192, 320, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_oahcw"]
atlas = ExtResource("3_46waf")
region = Rect2(360, 104, 112, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_0uiub"]
atlas = ExtResource("3_46waf")
region = Rect2(344, 328, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_py7ls"]
atlas = ExtResource("2_0ptex")
region = Rect2(64, 104, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_o5u2s"]
atlas = ExtResource("2_0ptex")
region = Rect2(48, 312, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_urbjo"]
atlas = ExtResource("2_0ptex")
region = Rect2(208, 104, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_g4qq6"]
atlas = ExtResource("2_0ptex")
region = Rect2(192, 320, 104, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_0go00"]
atlas = ExtResource("2_0ptex")
region = Rect2(360, 104, 112, 80)

[sub_resource type="AtlasTexture" id="AtlasTexture_en1fy"]
atlas = ExtResource("2_0ptex")
region = Rect2(344, 328, 104, 72)

[sub_resource type="AtlasTexture" id="AtlasTexture_sekrn"]
atlas = ExtResource("7_icdl0")
region = Rect2(800, 352, 272, 144)

[sub_resource type="AtlasTexture" id="AtlasTexture_qavaa"]
atlas = ExtResource("7_icdl0")
region = Rect2(800, 200, 272, 144)

[node name="Shop" type="Node2D"]
script = ExtResource("1_wmgx1")
time_limit = 30

[node name="Background" type="Sprite2D" parent="."]
texture = ExtResource("1_qg3jl")
centered = false

[node name="Stock" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_left = 43.0
offset_top = 199.0
offset_right = 768.0
offset_bottom = 490.0
script = ExtResource("3_axra2")
shelves = Array[Vector2]([Vector2(39, 6), Vector2(194, 8), Vector2(36, 117), Vector2(187, 124), Vector2(30, 207), Vector2(181, 209), Vector2(437, 11), Vector2(574, 9), Vector2(421, 127), Vector2(563, 126), Vector2(418, 214), Vector2(560, 210)])

[node name="adult_lv1" type="TextureButton" parent="Stock"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 74.5
offset_top = -134.5
offset_right = 178.5
offset_bottom = -54.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_a1nid")
texture_pressed = SubResource("AtlasTexture_y4l2s")
script = ExtResource("3_bt6yy")
hover_scale = Vector2(1.1, 1.1)

[node name="adult_lv2" type="TextureButton" parent="Stock"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 211.5
offset_top = -136.5
offset_right = 315.5
offset_bottom = -56.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_4ur8f")
texture_pressed = SubResource("AtlasTexture_hl15y")
script = ExtResource("3_bt6yy")
mask_type = 1
hover_scale = Vector2(1.1, 1.1)

[node name="adult_lv3" type="TextureButton" parent="Stock"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 58.5
offset_top = -18.5
offset_right = 170.5
offset_bottom = 61.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_oahcw")
texture_pressed = SubResource("AtlasTexture_0uiub")
script = ExtResource("3_bt6yy")
mask_type = 2
hover_scale = Vector2(1.1, 1.1)

[node name="child_lv1" type="TextureButton" parent="Stock"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 200.5
offset_top = -19.5
offset_right = 304.5
offset_bottom = 60.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_py7ls")
texture_pressed = SubResource("AtlasTexture_o5u2s")
script = ExtResource("3_bt6yy")
mask_type = 3
hover_scale = Vector2(1.1, 1.1)

[node name="child_lv2" type="TextureButton" parent="Stock"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 55.5
offset_top = 68.5
offset_right = 159.5
offset_bottom = 148.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_urbjo")
texture_pressed = SubResource("AtlasTexture_g4qq6")
script = ExtResource("3_bt6yy")
mask_type = 4
hover_scale = Vector2(1.1, 1.1)

[node name="child_lv3" type="TextureButton" parent="Stock"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 197.5
offset_top = 64.5
offset_right = 309.5
offset_bottom = 144.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_0go00")
texture_pressed = SubResource("AtlasTexture_en1fy")
script = ExtResource("3_bt6yy")
mask_type = 5
hover_scale = Vector2(1.1, 1.1)

[node name="buy" type="TextureButton" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 795.0
offset_top = 355.0
offset_right = 1067.0
offset_bottom = 499.0
grow_horizontal = 2
grow_vertical = 2
texture_normal = SubResource("AtlasTexture_sekrn")
texture_pressed = SubResource("AtlasTexture_qavaa")
script = ExtResource("7_ykhh4")
hover_scale = Vector2(1.1, 1.1)

[node name="cart" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_left = 2.0
offset_top = 519.0
offset_right = 1080.0
offset_bottom = 721.0
script = ExtResource("9_fvoyk")

[node name="qty1" type="RichTextLabel" parent="cart"]
layout_mode = 0
offset_left = 56.0
offset_top = 107.0
offset_right = 148.0
offset_bottom = 178.0
bbcode_enabled = true

[node name="qty2" type="RichTextLabel" parent="cart"]
layout_mode = 0
offset_left = 227.0
offset_top = 108.0
offset_right = 324.0
offset_bottom = 178.0
bbcode_enabled = true

[node name="qty3" type="RichTextLabel" parent="cart"]
layout_mode = 0
offset_left = 394.0
offset_top = 106.0
offset_right = 499.0
offset_bottom = 176.0
bbcode_enabled = true

[node name="qty4" type="RichTextLabel" parent="cart"]
layout_mode = 0
offset_left = 554.0
offset_top = 109.0
offset_right = 661.0
offset_bottom = 179.0
bbcode_enabled = true

[node name="qty5" type="RichTextLabel" parent="cart"]
layout_mode = 0
offset_left = 726.0
offset_top = 115.0
offset_right = 831.0
offset_bottom = 181.0
bbcode_enabled = true

[node name="qty6" type="RichTextLabel" parent="cart"]
layout_mode = 0
offset_left = 896.0
offset_top = 113.0
offset_right = 1009.0
offset_bottom = 178.0
bbcode_enabled = true

[node name="adult_lv1" type="TextureButton" parent="cart"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -484.0
offset_top = -94.0
offset_right = -380.0
offset_bottom = -14.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_a1nid")
texture_pressed = SubResource("AtlasTexture_y4l2s")
script = ExtResource("3_bt6yy")
hover_scale = Vector2(1.1, 1.1)

[node name="adult_lv2" type="TextureButton" parent="cart"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -313.0
offset_top = -94.0
offset_right = -209.0
offset_bottom = -14.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_4ur8f")
texture_pressed = SubResource("AtlasTexture_hl15y")
script = ExtResource("3_bt6yy")
mask_type = 1
hover_scale = Vector2(1.1, 1.1)

[node name="adult_lv3" type="TextureButton" parent="cart"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -150.0
offset_top = -95.0
offset_right = -38.0
offset_bottom = -15.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_oahcw")
texture_pressed = SubResource("AtlasTexture_0uiub")
script = ExtResource("3_bt6yy")
mask_type = 2
hover_scale = Vector2(1.1, 1.1)

[node name="child_lv1" type="TextureButton" parent="cart"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 15.0
offset_top = -90.0
offset_right = 119.0
offset_bottom = -10.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_py7ls")
texture_pressed = SubResource("AtlasTexture_o5u2s")
script = ExtResource("3_bt6yy")
mask_type = 3
hover_scale = Vector2(1.1, 1.1)

[node name="child_lv2" type="TextureButton" parent="cart"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 184.0
offset_top = -91.0
offset_right = 288.0
offset_bottom = -11.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_urbjo")
texture_pressed = SubResource("AtlasTexture_g4qq6")
script = ExtResource("3_bt6yy")
mask_type = 4
hover_scale = Vector2(1.1, 1.1)

[node name="child_lv3" type="TextureButton" parent="cart"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 355.0
offset_top = -88.0
offset_right = 467.0
offset_bottom = -8.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = SubResource("AtlasTexture_0go00")
texture_pressed = SubResource("AtlasTexture_en1fy")
script = ExtResource("3_bt6yy")
mask_type = 5
hover_scale = Vector2(1.1, 1.1)

[node name="time" type="Label" parent="."]
offset_left = 830.0
offset_top = 210.0
offset_right = 915.0
offset_bottom = 255.0
theme_override_font_sizes/font_size = 32
text = "Time:"

[node name="score" type="Label" parent="."]
visible = false
offset_left = 907.0
offset_top = 295.0
offset_right = 1001.0
offset_bottom = 340.0
theme_override_font_sizes/font_size = 32
text = "Score:"

[node name="Panel" type="Panel" parent="."]
visible = false
offset_left = 229.0
offset_top = 68.0
offset_right = 870.0
offset_bottom = 631.0

[node name="Label" type="Label" parent="Panel"]
layout_mode = 0
offset_left = 58.0
offset_top = 13.0
offset_right = 584.0
offset_bottom = 442.0
theme_override_font_sizes/font_size = 24
text = "There is a COVID-19 pandemic. You need to buy plenty of mask to protect yourself. You are calculating exact amount of different type of mask should be purchased. Let see if you can calculate correct amount or not.

Tutorial:
Click the mask on the shelves will add 1.
Click the mask on the cart will minus 1.
Once you satisfy the amount of each mask, click the cashier to verify."
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2

[node name="Button" type="Button" parent="Panel"]
layout_mode = 0
offset_left = 122.0
offset_top = 472.0
offset_right = 290.0
offset_bottom = 549.0
theme_override_font_sizes/font_size = 32
text = "Retry"

[node name="Button2" type="Button" parent="Panel"]
layout_mode = 0
offset_left = 349.0
offset_top = 471.0
offset_right = 517.0
offset_bottom = 548.0
theme_override_font_sizes/font_size = 32
text = "Exit"

[node name="se_add" type="AudioStreamPlayer" parent="."]
stream = ExtResource("10_4wvu0")

[node name="se_minus" type="AudioStreamPlayer" parent="."]
stream = ExtResource("11_td32c")

[node name="se_cashier" type="AudioStreamPlayer" parent="."]
stream = ExtResource("12_k5abp")

[node name="se_time_up" type="AudioStreamPlayer" parent="."]
stream = ExtResource("13_ynmxe")

[node name="se_btn_click" type="AudioStreamPlayer" parent="."]
stream = ExtResource("14_v12yb")

[connection signal="pressed" from="Stock/adult_lv1" to="." method="_on_stock_adult_lv_1_pressed"]
[connection signal="pressed" from="Stock/adult_lv2" to="." method="_on_stock_adult_lv_2_pressed"]
[connection signal="pressed" from="Stock/adult_lv3" to="." method="_on_stock_adult_lv_3_pressed"]
[connection signal="pressed" from="Stock/child_lv1" to="." method="_on_stock_child_lv_1_pressed"]
[connection signal="pressed" from="Stock/child_lv2" to="." method="_on_stock_child_lv_2_pressed"]
[connection signal="pressed" from="Stock/child_lv3" to="." method="_on_stock_child_lv_3_pressed"]
[connection signal="pressed" from="buy" to="." method="_on_buy_pressed"]
[connection signal="pressed" from="cart/adult_lv1" to="." method="_on_cart_adult_lv_1_pressed"]
[connection signal="pressed" from="cart/adult_lv2" to="." method="_on_cart_adult_lv_2_pressed"]
[connection signal="pressed" from="cart/adult_lv3" to="." method="_on_cart_adult_lv_3_pressed"]
[connection signal="pressed" from="cart/child_lv1" to="." method="_on_cart_child_lv_1_pressed"]
[connection signal="pressed" from="cart/child_lv2" to="." method="_on_cart_child_lv_2_pressed"]
[connection signal="pressed" from="cart/child_lv3" to="." method="_on_cart_child_lv_3_pressed"]
[connection signal="pressed" from="Panel/Button" to="." method="_on_button_pressed"]
[connection signal="pressed" from="Panel/Button2" to="." method="_on_button_2_pressed"]
