[gd_scene format=3 uid="uid://d26kvtk7cvrqu"]

[ext_resource type="Script" uid="uid://d0ytnrxp7pgsi" path="res://scripts/World.gd" id="1_world"]
[ext_resource type="Script" uid="uid://b3tm5g48fh60f" path="res://scripts/GridOverlay.gd" id="2_grid"]
[ext_resource type="Script" uid="uid://cirov0lgj2art" path="res://scripts/HQ.gd" id="3_hq"]

[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_sky"]
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

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

[sub_resource type="NavigationMesh" id="NavigationMesh_1"]

[sub_resource type="BoxMesh" id="BoxMesh_hq"]
size = Vector3(3, 3, 3)

[sub_resource type="BoxMesh" id="BoxMesh_hpbar"]
size = Vector3(3, 0.2, 0.05)

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

[node name="Camera3D" type="Camera3D" parent="." unique_id=2005587828]
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="." unique_id=2095291697]
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="." unique_id=1576487266]
environment = SubResource("Environment_env")

[node name="Ground" type="CSGBox3D" parent="." unique_id=1742724497]
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="NavigationRegion3D" type="NavigationRegion3D" parent="." unique_id=615063184]
navigation_mesh = SubResource("NavigationMesh_1")

[node name="HQ" type="Node3D" parent="." unique_id=1112710530]
script = ExtResource("3_hq")

[node name="MeshInstance3D" type="MeshInstance3D" parent="HQ" unique_id=148316428]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0)
mesh = SubResource("BoxMesh_hq")

[node name="HPBar" type="MeshInstance3D" parent="HQ" unique_id=817146854]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.4, 0)
mesh = SubResource("BoxMesh_hpbar")

[node name="Fill" type="MeshInstance3D" parent="HQ/HPBar" unique_id=918782843]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.01)
mesh = SubResource("BoxMesh_hpbar")

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

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

[node name="UI" type="Control" parent="." unique_id=1425837703]
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="WaveLabel" type="Label" parent="UI" unique_id=1270068590]
layout_mode = 0
offset_left = 20.0
offset_top = 20.0
offset_right = 220.0
offset_bottom = 60.0
theme_override_font_sizes/font_size = 24
text = "Wave: 1 / 5"

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

[node name="SpeedButton" type="Button" parent="UI" unique_id=1203582405]
layout_mode = 0
offset_left = 20.0
offset_top = 108.0
offset_right = 80.0
offset_bottom = 142.0
theme_override_font_sizes/font_size = 18
text = "2x"

[node name="TowerInfoLabel" type="Label" parent="UI" unique_id=1492555384]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -450.0
offset_top = -60.0
offset_right = 450.0
offset_bottom = -20.0
grow_horizontal = 2
grow_vertical = 0
theme_override_font_sizes/font_size = 18
text = "[1]Instant($100) [2]Proj($150) [3]Slow($125) [4]AOE($200)"
horizontal_alignment = 1

[node name="WavePreviewLabel" type="Label" parent="UI" unique_id=1976058001]
visible = false
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -250.0
offset_top = 20.0
offset_right = 250.0
offset_bottom = 70.0
grow_horizontal = 2
theme_override_font_sizes/font_size = 22
horizontal_alignment = 1

[node name="GameOverPanel" type="Panel" parent="UI" unique_id=548291314]
visible = false
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" unique_id=616466893]
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" unique_id=731336493]
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" unique_id=1177498163]
layout_mode = 2
theme_override_font_sizes/font_size = 24
text = "Restart"
