[gd_scene load_steps=9 format=3 uid="uid://c4sxql8vhfj5v"]

[ext_resource type="Script" path="res://scripts/World.gd" id="1_world"]
[ext_resource type="Script" path="res://scripts/PathVisualizer.gd" id="2_path_vis"]
[ext_resource type="Script" path="res://scripts/GridOverlay.gd" id="3_grid"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ground"]
albedo_color = Color(0.4, 0.6, 0.4, 1)

[sub_resource type="Curve3D" id="Curve3D_path"]
_data = {
"points": PackedVector3Array(0, 0, 0, 0, 0, 0, -15, 0, 10, 0, 0, 0, 0, 0, 0, -10, 0, 5, 0, 0, 0, 0, 0, 0, -10, 0, -5, 0, 0, 0, 0, 0, 0, 5, 0, -5, 0, 0, 0, 0, 0, 0, 5, 0, 5, 0, 0, 0, 0, 0, 0, 15, 0, 5),
"tilts": PackedFloat32Array(0, 0, 0, 0, 0, 0)
}
point_count = 6

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_sky"]
sky_top_color = Color(0.385, 0.454, 0.55, 1)
sky_horizon_color = Color(0.646, 0.656, 0.67, 1)
ground_horizon_color = Color(0.646, 0.656, 0.67, 1)

[sub_resource type="Sky" id="Sky_sky"]
sky_material = SubResource("ProceduralSkyMaterial_sky")

[sub_resource type="Environment" id="Environment_env"]
background_mode = 2
sky = SubResource("Sky_sky")
tonemap_mode = 2
glow_enabled = true

[node name="World" type="Node3D"]
script = ExtResource("1_world")

[node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 20, 20)
fov = 50.0

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, -0.75, 0.433013, 0, 15, 0)
shadow_enabled = true

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_env")

[node name="Ground" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.5, 0)
use_collision = true
size = Vector3(40, 1, 30)
material = SubResource("StandardMaterial3D_ground")

[node name="EnemyPath" type="Path3D" parent="."]
curve = SubResource("Curve3D_path")
script = ExtResource("2_path_vis")

[node name="GridOverlay" type="Node3D" parent="."]
script = ExtResource("3_grid")

[node name="SpawnTimer" type="Timer" parent="."]
one_shot = true

[node name="WaveTimer" type="Timer" parent="."]
one_shot = true

[node name="UI" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2

[node name="HPLabel" type="Label" parent="UI"]
layout_mode = 0
offset_left = 20.0
offset_top = 20.0
offset_right = 200.0
offset_bottom = 60.0
theme_override_font_sizes/font_size = 24
text = "HP: 100"

[node name="WaveLabel" type="Label" parent="UI"]
layout_mode = 0
offset_left = 20.0
offset_top = 60.0
offset_right = 200.0
offset_bottom = 100.0
theme_override_font_sizes/font_size = 24
text = "Wave: 1 / 5"

[node name="MoneyLabel" type="Label" parent="UI"]
layout_mode = 0
offset_left = 20.0
offset_top = 100.0
offset_right = 250.0
offset_bottom = 140.0
theme_override_font_sizes/font_size = 24
text = "Money: $500"

[node name="TowerInfoLabel" type="Label" parent="UI"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -400.0
offset_top = -60.0
offset_right = 400.0
offset_bottom = -20.0
grow_horizontal = 2
grow_vertical = 0
theme_override_font_sizes/font_size = 20
text = "[1] Instant Tower ($100) | [2] Projectile Tower ($150)"
horizontal_alignment = 1

[node name="GameOverPanel" type="Panel" parent="UI"]
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.0
offset_top = -150.0
offset_right = 200.0
offset_bottom = 150.0
grow_horizontal = 2
grow_vertical = 2

[node name="VBoxContainer" type="VBoxContainer" parent="UI/GameOverPanel"]
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 = -80.0
offset_right = 150.0
offset_bottom = 80.0
grow_horizontal = 2
grow_vertical = 2

[node name="GameOverLabel" type="Label" parent="UI/GameOverPanel/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 48
text = "GAME OVER"
horizontal_alignment = 1

[node name="RestartButton" type="Button" parent="UI/GameOverPanel/VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "Restart"
