273 lines
9.4 KiB
Plaintext
273 lines
9.4 KiB
Plaintext
[gd_scene load_steps=22 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"]
|
|
|
|
[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", "labelLevel", "labelLifes", "labelNextLevel", "labelPoints", "labelGameOver", "restartButton", "reachedPointsLabel", "healthBar", "vBoxPause")]
|
|
process_mode = 3
|
|
script = ExtResource("15_xl7yx")
|
|
rtlAsteroids = NodePath("VBoxLabels/rtlAsteroids")
|
|
labelLevel = NodePath("VBoxLabels/LabelLevel")
|
|
labelLifes = NodePath("VBoxLabels/LabelLives")
|
|
labelNextLevel = NodePath("VBoxLabels/LabelNextLevel")
|
|
labelPoints = NodePath("VBoxLabels/LabelPoints")
|
|
labelGameOver = NodePath("VBoxGameOver/LabelGameOver")
|
|
restartButton = NodePath("VBoxGameOver/RestartButton")
|
|
reachedPointsLabel = NodePath("VBoxGameOver/ReachedPointsLabel")
|
|
healthBar = NodePath("VBoxHealth/HealthBar")
|
|
vBoxPause = NodePath("VBoxPause")
|
|
|
|
[node name="VBoxLabels" type="VBoxContainer" parent="Ui"]
|
|
anchors_preset = 2
|
|
anchor_top = 1.0
|
|
anchor_bottom = 1.0
|
|
offset_top = 1138.0
|
|
offset_right = 152.0
|
|
offset_bottom = 1278.0
|
|
grow_vertical = 0
|
|
|
|
[node name="rtlAsteroids" type="RichTextLabel" parent="Ui/VBoxLabels"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
text = "Asteroids: 0"
|
|
scroll_active = false
|
|
shortcut_keys_enabled = false
|
|
|
|
[node name="LabelLevel" type="RichTextLabel" parent="Ui/VBoxLabels"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
text = "Level: 1"
|
|
scroll_active = false
|
|
shortcut_keys_enabled = false
|
|
|
|
[node name="LabelLives" type="RichTextLabel" parent="Ui/VBoxLabels"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
text = "Lives: 3"
|
|
scroll_active = false
|
|
shortcut_keys_enabled = false
|
|
|
|
[node name="LabelNextLevel" type="RichTextLabel" parent="Ui/VBoxLabels"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
text = "Next Level: 10"
|
|
scroll_active = false
|
|
shortcut_keys_enabled = false
|
|
|
|
[node name="LabelPoints" type="RichTextLabel" parent="Ui/VBoxLabels"]
|
|
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 = 197.0
|
|
offset_top = 556.0
|
|
offset_right = 605.0
|
|
offset_bottom = 854.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
|
|
[node name="LabelGameOver" type="Label" parent="Ui/VBoxGameOver"]
|
|
layout_mode = 2
|
|
text = "Game Over"
|
|
label_settings = SubResource("LabelSettings_dqsad")
|
|
horizontal_alignment = 1
|
|
vertical_alignment = 1
|
|
|
|
[node name="ReachedPointsLabel" type="RichTextLabel" parent="Ui/VBoxGameOver"]
|
|
layout_mode = 2
|
|
size_flags_vertical = 3
|
|
bbcode_enabled = true
|
|
text = "[center]You have reached level 1 and 0 points![/center]"
|
|
|
|
[node name="RestartButton" type="Button" parent="Ui/VBoxGameOver"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
size_flags_vertical = 6
|
|
shortcut = SubResource("Shortcut_soxs4")
|
|
text = "Restart"
|
|
|
|
[node name="VBoxPause" type="VBoxContainer" parent="Ui"]
|
|
offset_left = 195.5
|
|
offset_top = 647.0
|
|
offset_right = 603.5
|
|
offset_bottom = 788.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"]
|
|
layout_mode = 2
|
|
size_flags_horizontal = 4
|
|
size_flags_vertical = 6
|
|
text = "Resume
|
|
"
|
|
|
|
[node name="VBoxHealth" type="VBoxContainer" parent="Ui"]
|
|
offset_top = 1274.0
|
|
offset_right = 152.0
|
|
offset_bottom = 1278.0
|
|
grow_horizontal = 2
|
|
|
|
[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
|