Godot-SpaceShooter/Scenes/SpaceShooter.tscn

427 lines
15 KiB
Plaintext

[gd_scene load_steps=34 format=3 uid="uid://det8556rpxhbv"]
[ext_resource type="PackedScene" uid="uid://tlr55u0gn20l" path="res://Packed-Scenes/PlayerShip.tscn" id="1_njb5h"]
[ext_resource type="Texture2D" uid="uid://cg6n1hh3lj7rn" path="res://Textures/tile_nebula_green_dff.png" id="2_43vix"]
[ext_resource type="Script" path="res://Scripts/Background.cs" id="3_imgbw"]
[ext_resource type="PackedScene" uid="uid://6dn1gjqffnt" path="res://Packed-Scenes/asteroid_01.tscn" id="5_do6ba"]
[ext_resource type="AudioStream" uid="uid://cyleigtlbv5o8" path="res://Sounds/explosion_player.wav" id="6_h2mtt"]
[ext_resource type="PackedScene" uid="uid://cvlxm2yrohsca" path="res://Packed-Scenes/asteroid_02.tscn" id="6_tqoe7"]
[ext_resource type="PackedScene" uid="uid://brqqgidqchi88" path="res://Packed-Scenes/asteroid_03.tscn" id="7_v6ul2"]
[ext_resource type="Script" path="res://Scripts/SoundManager.cs" id="8_4ksf0"]
[ext_resource type="AudioStream" uid="uid://bthqgu8sulv77" path="res://Sounds/music_background.wav" id="8_4ms0p"]
[ext_resource type="AudioStream" uid="uid://t0y8yw2ceskq" path="res://Sounds/explosion_asteroid.wav" id="9_2dqf6"]
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="9_rsrr5"]
[ext_resource type="AudioStream" uid="uid://bspwjmgsoxkbn" path="res://Sounds/gameover2.wav" id="9_rtdps"]
[ext_resource type="AudioStream" uid="uid://dlml6o3xscxqf" path="res://Sounds/weapon_player.wav" id="11_bbedd"]
[ext_resource type="Script" path="res://Scripts/GameArea.cs" id="11_p0rh7"]
[ext_resource type="Script" path="res://Scripts/InputManager.cs" id="15_uovst"]
[ext_resource type="Script" path="res://Scripts/Ui.cs" id="15_xl7yx"]
[ext_resource type="Texture2D" uid="uid://ddikd6m3t7prw" path="res://Images/generic_arrow_3.png" id="17_1t6sc"]
[ext_resource type="Texture2D" uid="uid://bffseflkbu88e" path="res://Images/generic_arrow_long.png" id="18_b2vca"]
[ext_resource type="Texture2D" uid="uid://c4l1soqbo0rud" path="res://Images/keyboard_arrows.png" id="19_dpw4m"]
[ext_resource type="Texture2D" uid="uid://bnh0rcsf30nrm" path="res://Images/keyboard_w.png" id="20_3aqu5"]
[ext_resource type="Texture2D" uid="uid://cm7ru4t8ka3jn" path="res://Images/keyboard_a.png" id="21_of2rn"]
[ext_resource type="Texture2D" uid="uid://c2n36lnm2f5he" path="res://Images/keyboard_s.png" id="22_1rcux"]
[ext_resource type="Texture2D" uid="uid://uy20bgblsk4x" path="res://Images/keyboard_d.png" id="23_o81a8"]
[ext_resource type="Texture2D" uid="uid://dkc2vx71bnhdh" path="res://Images/keyboard_space.png" id="24_cuten"]
[ext_resource type="Texture2D" uid="uid://dojdjls5b310j" path="res://Images/keyboard_enter.png" id="25_u4r31"]
[ext_resource type="Texture2D" uid="uid://dh4l4vkgkjxup" path="res://Images/keyboard_escape.png" id="26_oxfmw"]
[ext_resource type="LabelSettings" uid="uid://cdqcuhuk1yclm" path="res://Material/lblSettingsCountdown.tres" id="27_0p8jc"]
[ext_resource type="Texture2D" uid="uid://c5tms7y368pit" path="res://Images/keyboard_any.png" id="28_g1v6s"]
[sub_resource type="BoxShape3D" id="BoxShape3D_bw288"]
[sub_resource type="LabelSettings" id="LabelSettings_dqsad"]
font_size = 50
font_color = Color(1, 0, 0, 1)
outline_size = 3
outline_color = Color(1, 0.999986, 0.00293482, 1)
shadow_size = 10
shadow_offset = Vector2(5, 5)
[sub_resource type="InputEventKey" id="InputEventKey_gjrl7"]
device = -1
keycode = 4194309
[sub_resource type="Shortcut" id="Shortcut_soxs4"]
events = [SubResource("InputEventKey_gjrl7")]
[sub_resource type="LabelSettings" id="LabelSettings_vf3s8"]
font_size = 50
font_color = Color(0.233592, 0.506913, 1, 1)
outline_size = 3
outline_color = Color(0, 1, 0.00392157, 1)
shadow_size = 10
shadow_offset = Vector2(5, 5)
[node name="SpaceShooter" type="Node3D"]
process_mode = 3
[node name="PlayerShip" parent="." node_paths=PackedStringArray("jet", "PlayerRb", "shots") instance=ExtResource("1_njb5h")]
process_mode = 1
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74227e-08, 0, -1, 0, 0, 5)
jet = NodePath("RigidBody3D/Jet")
PlayerRb = NodePath("RigidBody3D")
shots = NodePath("Shots")
[node name="Camera3D" type="Camera3D" parent="."]
process_mode = 1
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 8.8, 0)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
process_mode = 1
transform = Transform3D(1, 0, 0, 0, 0.707106, 0.707106, 0, -0.707106, 0.707106, 10, 10, 10)
[node name="Background" type="Sprite3D" parent="."]
process_mode = 1
transform = Transform3D(1.1, 0, 0, 0, -4.80825e-08, -1, 0, 1.1, -4.37114e-08, 0, -0.5, 0)
billboard = 1
shaded = true
double_sided = false
texture = ExtResource("2_43vix")
region_enabled = true
region_rect = Rect2(0, 0, 810, 1380)
script = ExtResource("3_imgbw")
[node name="Asteroids" type="Node3D" parent="."]
process_mode = 1
[node name="GameArea" type="Node3D" parent="."]
process_mode = 1
script = ExtResource("11_p0rh7")
[node name="Bottom" type="RigidBody3D" parent="GameArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 12)
gravity_scale = 0.0
freeze = true
freeze_mode = 1
[node name="Bottom" type="CollisionShape3D" parent="GameArea/Bottom"]
transform = Transform3D(9, 0, 0, 0, 9, 0, 0, 0, 9, 0, 0, 0)
shape = SubResource("BoxShape3D_bw288")
[node name="Left" type="RigidBody3D" parent="GameArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12, 0, 0)
gravity_scale = 0.0
freeze = true
freeze_mode = 1
[node name="Left" type="CollisionShape3D" parent="GameArea/Left"]
transform = Transform3D(15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0)
shape = SubResource("BoxShape3D_bw288")
[node name="Right" type="RigidBody3D" parent="GameArea"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 12, 0, 0)
gravity_scale = 0.0
freeze = true
freeze_mode = 1
[node name="Right" type="CollisionShape3D" parent="GameArea/Right"]
transform = Transform3D(15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0)
shape = SubResource("BoxShape3D_bw288")
[node name="SoundManager" type="Node" parent="." node_paths=PackedStringArray("backgroundMusic", "gameOverMusic", "asteroidExplosionSound", "playerExplosionSound", "laserSound")]
process_mode = 1
script = ExtResource("8_4ksf0")
backgroundMusic = NodePath("BackgroundMusic")
gameOverMusic = NodePath("GameOverMusic")
asteroidExplosionSound = NodePath("AsteroidExplosionSound")
playerExplosionSound = NodePath("PlayerExplosionSound")
laserSound = NodePath("LaserSound")
[node name="AsteroidExplosionSound" type="AudioStreamPlayer3D" parent="SoundManager"]
stream = ExtResource("9_2dqf6")
[node name="PlayerExplosionSound" type="AudioStreamPlayer3D" parent="SoundManager"]
stream = ExtResource("6_h2mtt")
[node name="BackgroundMusic" type="AudioStreamPlayer" parent="SoundManager"]
stream = ExtResource("8_4ms0p")
volume_db = -20.0
[node name="GameOverMusic" type="AudioStreamPlayer" parent="SoundManager"]
stream = ExtResource("9_rtdps")
[node name="LaserSound" type="AudioStreamPlayer3D" parent="SoundManager"]
stream = ExtResource("11_bbedd")
[node name="GameManager" type="Node" parent="." node_paths=PackedStringArray("asteroidsContainer")]
process_mode = 1
script = ExtResource("9_rsrr5")
asteroids = Array[PackedScene]([ExtResource("5_do6ba"), ExtResource("6_tqoe7"), ExtResource("7_v6ul2")])
asteroidsContainer = NodePath("../Asteroids")
[node name="InputManager" type="Node" parent="."]
process_mode = 3
script = ExtResource("15_uovst")
[node name="Ui" type="Node2D" parent="." node_paths=PackedStringArray("rtlAsteroids", "rtlLevel", "rtlLifes", "rtlNextLevel", "rtlPoints", "vBoxGameOver", "lblGameOver", "buttonRestart", "lblReachedPoints", "healthBar", "vBoxPause", "buttonResume", "buttonPauseRestart", "vBoxCountdown", "lblCountdown", "textAnyKey", "lblAnyKey")]
process_mode = 3
script = ExtResource("15_xl7yx")
rtlAsteroids = NodePath("VBoxStats/rtlAsteroids")
rtlLevel = NodePath("VBoxStats/trlLevel")
rtlLifes = NodePath("VBoxStats/rtlLifes")
rtlNextLevel = NodePath("VBoxStats/rtlNextLevel")
rtlPoints = NodePath("VBoxStats/rtlPoints")
vBoxGameOver = NodePath("VBoxGameOver")
lblGameOver = NodePath("VBoxGameOver/lblGameOver")
buttonRestart = NodePath("VBoxGameOver/RestartButton")
lblReachedPoints = NodePath("VBoxGameOver/lblReachedPoints")
healthBar = NodePath("VBoxHealth/HealthBar")
vBoxPause = NodePath("VBoxPause")
buttonResume = NodePath("VBoxPause/ButtonResume")
buttonPauseRestart = NodePath("VBoxPause/PauseRestartButton")
vBoxCountdown = NodePath("VBoxCountdown")
lblCountdown = NodePath("VBoxCountdown/lblCountdown")
textAnyKey = NodePath("VBoxCountdown/textPressKey")
lblAnyKey = NodePath("VBoxCountdown/lblPressKey")
[node name="VBoxStats" type="VBoxContainer" parent="Ui"]
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_left = 8.0
offset_top = 1129.0
offset_right = 160.0
offset_bottom = 1269.0
grow_vertical = 0
[node name="rtlAsteroids" type="RichTextLabel" parent="Ui/VBoxStats"]
layout_mode = 2
size_flags_vertical = 3
text = "Asteroids: 0"
scroll_active = false
shortcut_keys_enabled = false
[node name="trlLevel" type="RichTextLabel" parent="Ui/VBoxStats"]
layout_mode = 2
size_flags_vertical = 3
text = "Level: 1"
scroll_active = false
shortcut_keys_enabled = false
[node name="rtlLifes" type="RichTextLabel" parent="Ui/VBoxStats"]
layout_mode = 2
size_flags_vertical = 3
text = "Lives: 3"
scroll_active = false
shortcut_keys_enabled = false
[node name="rtlNextLevel" type="RichTextLabel" parent="Ui/VBoxStats"]
layout_mode = 2
size_flags_vertical = 3
text = "Next Level: 10"
scroll_active = false
shortcut_keys_enabled = false
[node name="rtlPoints" type="RichTextLabel" parent="Ui/VBoxStats"]
layout_mode = 2
size_flags_vertical = 3
text = "Points: 0"
scroll_active = false
shortcut_keys_enabled = false
[node name="VBoxGameOver" type="VBoxContainer" parent="Ui"]
visible = false
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 201.0
offset_top = 451.0
offset_right = 609.0
offset_bottom = 749.0
grow_horizontal = 2
grow_vertical = 2
[node name="lblGameOver" type="Label" parent="Ui/VBoxGameOver"]
layout_mode = 2
text = "Game Over"
label_settings = SubResource("LabelSettings_dqsad")
horizontal_alignment = 1
vertical_alignment = 1
[node name="lblReachedPoints" type="Label" parent="Ui/VBoxGameOver"]
custom_minimum_size = Vector2(0, 100)
layout_mode = 2
text = "You have reached level 1 and 0 points!"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 3
[node name="RestartButton" type="Button" parent="Ui/VBoxGameOver"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
button_mask = 5
shortcut = SubResource("Shortcut_soxs4")
text = "Restart"
icon = ExtResource("17_1t6sc")
[node name="VBoxPause" type="VBoxContainer" parent="Ui"]
visible = false
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 205.0
offset_top = 451.0
offset_right = 613.0
offset_bottom = 672.0
grow_horizontal = 2
grow_vertical = 2
[node name="LabelPause" type="Label" parent="Ui/VBoxPause"]
layout_mode = 2
text = "Pause"
label_settings = SubResource("LabelSettings_vf3s8")
horizontal_alignment = 1
vertical_alignment = 1
[node name="ButtonResume" type="Button" parent="Ui/VBoxPause"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
button_mask = 5
text = "Resume
"
icon = ExtResource("18_b2vca")
[node name="PauseRestartButton" type="Button" parent="Ui/VBoxPause"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
button_mask = 5
shortcut = SubResource("Shortcut_soxs4")
text = "Restart"
icon = ExtResource("17_1t6sc")
[node name="VBoxHealth" type="VBoxContainer" parent="Ui"]
offset_left = 330.0
offset_top = 14.0
offset_right = 482.0
offset_bottom = 18.0
[node name="HealthBar" type="ProgressBar" parent="Ui/VBoxHealth"]
layout_mode = 2
size_flags_vertical = 3
max_value = 10.0
value = 7.0
rounded = true
show_percentage = false
[node name="BoxHelp" type="BoxContainer" parent="Ui"]
anchors_preset = 1
anchor_left = 1.0
anchor_right = 1.0
offset_left = 635.0
offset_top = 12.0
offset_right = 787.0
offset_bottom = 212.0
grow_horizontal = 0
[node name="VBoxHelp" type="VBoxContainer" parent="Ui/BoxHelp"]
layout_mode = 2
[node name="HBoxMovement" type="HBoxContainer" parent="Ui/BoxHelp/VBoxHelp"]
layout_mode = 2
[node name="TextureArrowKeys" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"]
layout_mode = 2
texture = ExtResource("19_dpw4m")
[node name="TextureW" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"]
visible = false
layout_mode = 2
texture = ExtResource("20_3aqu5")
[node name="TextureA" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"]
visible = false
layout_mode = 2
texture = ExtResource("21_of2rn")
[node name="TextureS" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"]
visible = false
layout_mode = 2
texture = ExtResource("22_1rcux")
[node name="TextureD" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"]
visible = false
layout_mode = 2
texture = ExtResource("23_o81a8")
[node name="lblMovement" type="Label" parent="Ui/BoxHelp/VBoxHelp/HBoxMovement"]
layout_mode = 2
text = "Movement
"
[node name="HBoxShooting" type="HBoxContainer" parent="Ui/BoxHelp/VBoxHelp"]
layout_mode = 2
[node name="TextureSpace" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxShooting"]
layout_mode = 2
texture = ExtResource("24_cuten")
[node name="TextureEnter" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxShooting"]
visible = false
layout_mode = 2
texture = ExtResource("25_u4r31")
[node name="lblShooting" type="Label" parent="Ui/BoxHelp/VBoxHelp/HBoxShooting"]
layout_mode = 2
text = "Shooting"
[node name="HBoxPause" type="HBoxContainer" parent="Ui/BoxHelp/VBoxHelp"]
layout_mode = 2
[node name="TexturePause" type="TextureRect" parent="Ui/BoxHelp/VBoxHelp/HBoxPause"]
layout_mode = 2
texture = ExtResource("26_oxfmw")
[node name="lblPause" type="Label" parent="Ui/BoxHelp/VBoxHelp/HBoxPause"]
layout_mode = 2
text = "Pause"
[node name="VBoxCountdown" type="VBoxContainer" parent="Ui"]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 330.0
offset_top = 524.0
offset_right = 496.0
offset_bottom = 892.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
alignment = 1
[node name="lblCountdown" type="Label" parent="Ui/VBoxCountdown"]
layout_mode = 2
size_flags_horizontal = 4
text = "3"
label_settings = ExtResource("27_0p8jc")
horizontal_alignment = 1
vertical_alignment = 1
[node name="textPressKey" type="TextureRect" parent="Ui/VBoxCountdown"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("28_g1v6s")
stretch_mode = 2
[node name="lblPressKey" type="Label" parent="Ui/VBoxCountdown"]
layout_mode = 2
size_flags_horizontal = 4
text = "Press any key to start"
horizontal_alignment = 1
vertical_alignment = 1