[gd_scene load_steps=19 format=3 uid="uid://bmc2exqutt6vu"]

[ext_resource type="PackedScene" uid="uid://csacin2gx2tum" path="res://scenes/spaceShip/spaceShip.tscn" id="1_nnn47"]
[ext_resource type="Script" uid="uid://0i8gdbb8f6ic" path="res://scenes/spaceShip/player/player.gd" id="2_acneu"]
[ext_resource type="Texture2D" uid="uid://cd5anydes4tv3" path="res://assets/player/shotgunShip.png" id="3_ah1lv"]
[ext_resource type="Texture2D" uid="uid://dlahm782n0awk" path="res://assets/player/minigunShip.png" id="4_1o0bm"]
[ext_resource type="Theme" uid="uid://bcbicfiflkrja" path="res://theme/interface.tres" id="4_o6j0d"]
[ext_resource type="Script" uid="uid://cb4i45ekmd2is" path="res://scenes/spaceShip/player/camera2d.gd" id="4_sk4ix"]
[ext_resource type="Texture2D" uid="uid://dhbn4acw1a6eu" path="res://assets/player/railgunShip.png" id="5_5sy6u"]
[ext_resource type="PackedScene" uid="uid://ha8undpo7d4d" path="res://scenes/upgradeChooser/upgradeChooser.tscn" id="5_nno2o"]
[ext_resource type="Texture2D" uid="uid://bwtb3m00d1gu2" path="res://assets/symbols/heart.png" id="6_sytd6"]
[ext_resource type="Texture2D" uid="uid://cmb78bi27e2jl" path="res://assets/ui/dash.png" id="7_qoa7h"]
[ext_resource type="AudioStream" uid="uid://xldfu6srikfp" path="res://assets/sound/hit.wav" id="7_sma6c"]
[ext_resource type="Script" uid="uid://ds2moov3l1dyk" path="res://scenes/spaceShip/player/input.gd" id="8_5l1u7"]
[ext_resource type="Texture2D" uid="uid://vxl26x3xc8ms" path="res://assets/ui/reload.png" id="8_48lx4"]
[ext_resource type="Texture2D" uid="uid://c0qub1plvyt4x" path="res://assets/ui/move.png" id="10_5l1u7"]
[ext_resource type="Texture2D" uid="uid://bgqfuj6p3h5ad" path="res://assets/ui/attack.png" id="11_5l1u7"]
[ext_resource type="Script" uid="uid://bqykrbwxdktxk" path="res://addons/virtual_joystick/virtual_joystick_instantiator.gd" id="13_1o0bm"]

[sub_resource type="CircleShape2D" id="CircleShape2D_0gv45"]
radius = 56.5685

[sub_resource type="RectangleShape2D" id="RectangleShape2D_0gv45"]
size = Vector2(112, 112)

[node name="Player" groups=["player"] instance=ExtResource("1_nnn47")]
collision_layer = 12
collision_mask = 3
motion_mode = 1
script = ExtResource("2_acneu")
spawnDistance = 5000
shotgunTexture = ExtResource("3_ah1lv")
minigunTexture = ExtResource("4_1o0bm")
railgunTexture = ExtResource("5_5sy6u")
invincible = true

[node name="CollisionShape2D" parent="." index="0"]
shape = SubResource("CircleShape2D_0gv45")

[node name="CollisionShape2D" parent="hurtArea" index="0"]
shape = SubResource("RectangleShape2D_0gv45")

[node name="Sprite2D" parent="." index="2"]
position = Vector2(0, -24)

[node name="dashCooldown" type="Timer" parent="." index="5"]
wait_time = 10.0
one_shot = true
autostart = true

[node name="selfHealTimer" type="Timer" parent="." index="6"]
one_shot = true

[node name="selfHealCountdownTimer" type="Timer" parent="." index="7"]
wait_time = 10.0
one_shot = true

[node name="Camera2D" type="Camera2D" parent="." index="8"]
script = ExtResource("4_sk4ix")

[node name="CanvasLayer" type="CanvasLayer" parent="Camera2D" index="0"]

[node name="Control" type="Control" parent="Camera2D/CanvasLayer" index="0"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("4_o6j0d")

[node name="Input" type="Control" parent="Camera2D/CanvasLayer/Control" index="0"]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("8_5l1u7")

[node name="Virtual Joystick" type="Control" parent="Camera2D/CanvasLayer/Control/Input" index="0"]
modulate = Color(1, 1, 1, 0.588235)
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -40.0
offset_right = 40.0
grow_vertical = 0
scale = Vector2(2.5, 2.5)
script = ExtResource("13_1o0bm")
metadata/_custom_type_script = "uid://bqykrbwxdktxk"

[node name="MoveButton" type="TouchScreenButton" parent="Camera2D/CanvasLayer/Control/Input" index="1"]
modulate = Color(1, 1, 1, 0.588235)
position = Vector2(1408, 576)
scale = Vector2(14, 14)
texture_normal = ExtResource("10_5l1u7")
action = "touchscreenForward"

[node name="ShootButton" type="TouchScreenButton" parent="Camera2D/CanvasLayer/Control/Input" index="2"]
modulate = Color(1, 1, 1, 0.588235)
position = Vector2(896, 560)
scale = Vector2(14, 14)
texture_normal = ExtResource("11_5l1u7")
action = "attack"

[node name="ShootButtonCorner" type="Control" parent="Camera2D/CanvasLayer/Control/Input" index="3"]
layout_mode = 1
anchor_left = 0.992
anchor_top = 0.985
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -1016.64
offset_top = -495.8
offset_right = -1024.0
offset_bottom = -504.0
grow_horizontal = 0
grow_vertical = 0

[node name="MoveButtonCorner" type="Control" parent="Camera2D/CanvasLayer/Control/Input" index="4"]
layout_mode = 1
anchor_left = 0.992
anchor_top = 0.985
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -504.64
offset_top = -495.8
offset_right = -512.0
offset_bottom = -504.0
grow_horizontal = 0
grow_vertical = 0

[node name="VBoxContainer" type="VBoxContainer" parent="Camera2D/CanvasLayer/Control" index="1"]
layout_mode = 1
offset_left = 64.0
offset_top = 64.0
offset_right = 1096.0
offset_bottom = 238.0

[node name="Weapon" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/VBoxContainer" index="0"]
layout_mode = 2

[node name="TextureRect" type="TextureRect" parent="Camera2D/CanvasLayer/Control/VBoxContainer/Weapon" index="0"]
layout_mode = 2

[node name="HealthUi" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/VBoxContainer" index="1"]
layout_mode = 2

[node name="TextureRect" type="TextureRect" parent="Camera2D/CanvasLayer/Control/VBoxContainer/HealthUi" index="0"]
layout_mode = 2
texture = ExtResource("6_sytd6")
expand_mode = 2

[node name="LabelHealth" type="Label" parent="Camera2D/CanvasLayer/Control/VBoxContainer/HealthUi" index="1"]
layout_mode = 2

[node name="ProgressBarHealth" type="ProgressBar" parent="Camera2D/CanvasLayer/Control/VBoxContainer/HealthUi" index="2"]
modulate = Color(1, 0, 0, 1)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
theme_override_font_sizes/font_size = 0
show_percentage = false

[node name="SpeedUi" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/VBoxContainer" index="2"]
visible = false
layout_mode = 2

[node name="LabelSpeed" type="Label" parent="Camera2D/CanvasLayer/Control/VBoxContainer/SpeedUi" index="0"]
layout_mode = 2
text = "S"

[node name="ProgressBarSpeed" type="ProgressBar" parent="Camera2D/CanvasLayer/Control/VBoxContainer/SpeedUi" index="1"]
layout_mode = 2
size_flags_horizontal = 3
step = 1.0

[node name="DashCooldownUi" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/VBoxContainer" index="3"]
visible = false
layout_mode = 2

[node name="TextureRect" type="TextureRect" parent="Camera2D/CanvasLayer/Control/VBoxContainer/DashCooldownUi" index="0"]
layout_mode = 2
texture = ExtResource("7_qoa7h")
expand_mode = 2

[node name="LabelDashCooldown" type="Label" parent="Camera2D/CanvasLayer/Control/VBoxContainer/DashCooldownUi" index="1"]
layout_mode = 2

[node name="ProgressBarDashCooldown" type="ProgressBar" parent="Camera2D/CanvasLayer/Control/VBoxContainer/DashCooldownUi" index="2"]
modulate = Color(0, 0.172549, 1, 1)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
show_percentage = false

[node name="WeaponCooldown" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/VBoxContainer" index="4"]
layout_mode = 2

[node name="TextureRect" type="TextureRect" parent="Camera2D/CanvasLayer/Control/VBoxContainer/WeaponCooldown" index="0"]
layout_mode = 2
texture = ExtResource("8_48lx4")
expand_mode = 2

[node name="LabelWeaponCooldown" type="Label" parent="Camera2D/CanvasLayer/Control/VBoxContainer/WeaponCooldown" index="1"]
layout_mode = 2

[node name="ProgressBarWeaponCooldown" type="ProgressBar" parent="Camera2D/CanvasLayer/Control/VBoxContainer/WeaponCooldown" index="2"]
modulate = Color(0.870588, 1, 0, 1)
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
show_percentage = false

[node name="HBoxContainer" type="VBoxContainer" parent="Camera2D/CanvasLayer/Control" index="2"]
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = -560.0
offset_top = 64.0
offset_right = -61.0
offset_bottom = 321.0
grow_horizontal = 0
alignment = 1

[node name="HBoxContainer" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/HBoxContainer" index="0"]
layout_mode = 2
alignment = 1

[node name="LabelWave" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer/HBoxContainer" index="0"]
layout_mode = 2
text = "WAVE: "

[node name="LabelWaveInfo" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer/HBoxContainer" index="1"]
layout_mode = 2

[node name="HBoxContainer2" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/HBoxContainer" index="1"]
layout_mode = 2
alignment = 1

[node name="LabelWaveEnemies" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer/HBoxContainer2" index="0"]
layout_mode = 2
text = "Enemies: "

[node name="LabelWaveEnemiesInfo" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer/HBoxContainer2" index="1"]
layout_mode = 2

[node name="HBoxContainer3" type="HBoxContainer" parent="Camera2D/CanvasLayer/Control/HBoxContainer" index="2"]
layout_mode = 2
alignment = 1

[node name="LabelWaveDestroyed" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer/HBoxContainer3" index="0"]
layout_mode = 2
text = "Destroyed: "

[node name="LabelWaveDestroyedInfo" type="Label" parent="Camera2D/CanvasLayer/Control/HBoxContainer/HBoxContainer3" index="1"]
layout_mode = 2

[node name="UpgradeChooser" parent="Camera2D/CanvasLayer/Control" index="3" instance=ExtResource("5_nno2o")]
visible = false
layout_mode = 1

[node name="hit" type="AudioStreamPlayer2D" parent="." index="9"]
stream = ExtResource("7_sma6c")

[connection signal="hurt" from="hurtArea" to="." method="_on_hurt_area_hurt"]
[connection signal="timeout" from="dashCooldown" to="." method="_on_dash_cooldown_timeout"]
[connection signal="timeout" from="selfHealTimer" to="." method="_on_self_heal_timer_timeout"]
[connection signal="timeout" from="selfHealCountdownTimer" to="." method="_on_self_heal_countdown_timeout"]

[editable path="hurtArea"]
