-refactor: refactor filesystem for readability and to show purpose
This commit is contained in:
parent
e94dbca828
commit
83b0eb6ea9
BIN
MB_FYP/assets/sounds/laser_fire.ogg
Normal file
BIN
MB_FYP/assets/sounds/laser_fire.ogg
Normal file
Binary file not shown.
19
MB_FYP/assets/sounds/laser_fire.ogg.import
Normal file
19
MB_FYP/assets/sounds/laser_fire.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://bkmou1np8dpi6"
|
||||
path="res://.godot/imported/laser_fire.ogg-d7b8b23ced7e218c23ff4b869a02843a.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/laser_fire.ogg"
|
||||
dest_files=["res://.godot/imported/laser_fire.ogg-d7b8b23ced7e218c23ff4b869a02843a.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
BIN
MB_FYP/assets/sounds/ship_dmg.ogg
Normal file
BIN
MB_FYP/assets/sounds/ship_dmg.ogg
Normal file
Binary file not shown.
19
MB_FYP/assets/sounds/ship_dmg.ogg.import
Normal file
19
MB_FYP/assets/sounds/ship_dmg.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://7jden56war5n"
|
||||
path="res://.godot/imported/ship_dmg.ogg-724c925f497e421868e840bebced9f5c.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sounds/ship_dmg.ogg"
|
||||
dest_files=["res://.godot/imported/ship_dmg.ogg-724c925f497e421868e840bebced9f5c.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
|
|
@ -1,20 +1,23 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://3e6fmds2x8q5"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://3e6fmds2x8q5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://soden53qtfxf" path="res://assets/Ships/Fighters/Enemy/enemyFighter.png" id="1_4l75b"]
|
||||
[ext_resource type="Script" path="res://script/ai_fighter.cs" id="1_kyds1"]
|
||||
[ext_resource type="FontFile" uid="uid://ryhimaxr7tr4" path="res://assets/Fonts/Kenney Mini Square.ttf" id="3_8bw2f"]
|
||||
[ext_resource type="Script" path="res://script/entities/ai_fighter.cs" id="1_mbtbe"]
|
||||
[ext_resource type="Texture2D" uid="uid://soden53qtfxf" path="res://assets/Ships/Fighters/Enemy/enemyFighter.png" id="2_ddmyk"]
|
||||
[ext_resource type="FontFile" uid="uid://ryhimaxr7tr4" path="res://assets/Fonts/Kenney Mini Square.ttf" id="3_ps710"]
|
||||
[ext_resource type="AudioStream" uid="uid://bkmou1np8dpi6" path="res://assets/sounds/laser_fire.ogg" id="4_mwdhe"]
|
||||
[ext_resource type="AudioStream" uid="uid://7jden56war5n" path="res://assets/sounds/ship_dmg.ogg" id="5_3k4h5"]
|
||||
[ext_resource type="AudioStream" uid="uid://d4ebqwhtvkwvd" path="res://scenes/ui/ship_explode.ogg" id="6_5sxl0"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_6vq6f"]
|
||||
radius = 41.0488
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_lim1q"]
|
||||
font = ExtResource("3_8bw2f")
|
||||
font = ExtResource("3_ps710")
|
||||
font_size = 40
|
||||
|
||||
[node name="AI_Fighter" type="CharacterBody2D"]
|
||||
collision_mask = 13
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_kyds1")
|
||||
script = ExtResource("1_mbtbe")
|
||||
Faction = 2
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
|
|
@ -22,7 +25,7 @@ scale = Vector2(1.3, 1.3)
|
|||
shape = SubResource("CircleShape2D_6vq6f")
|
||||
|
||||
[node name="ShipSprite" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("1_4l75b")
|
||||
texture = ExtResource("2_ddmyk")
|
||||
|
||||
[node name="LaserSpawn" type="Node2D" parent="."]
|
||||
position = Vector2(0, -75)
|
||||
|
|
@ -49,3 +52,12 @@ scale = Vector2(0.5, 0.5)
|
|||
text = "HP"
|
||||
label_settings = SubResource("LabelSettings_lim1q")
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="LaserSFX" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("4_mwdhe")
|
||||
|
||||
[node name="DamageSFX" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("5_3k4h5")
|
||||
|
||||
[node name="ExplodeSFX" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("6_5sxl0")
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dnvcics1ni4pa"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/asteroid.cs" id="1_rxx5v"]
|
||||
[ext_resource type="Script" path="res://script/entities/asteroid.cs" id="1_rxx5v"]
|
||||
[ext_resource type="Texture2D" uid="uid://bai5xn2p7e5pd" path="res://assets/PNG/Meteors/meteorBrown_small1.png" id="2_rmklb"]
|
||||
[ext_resource type="Shape2D" uid="uid://iatbcsveyeh0" path="res://assets/CollisionShapes/asteroid_cshape_smallcircle.tres" id="3_pxcia"]
|
||||
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://b77r6f5awabe0"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://b77r6f5awabe0"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/Laser.cs" id="1_ctmji"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1tayknrnnrnx" path="res://assets/PNG/Lasers/laserBlue01.png" id="2_nq6d6"]
|
||||
[ext_resource type="Script" path="res://script/entities/Laser.cs" id="1_qm1lv"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1tayknrnnrnx" path="res://assets/PNG/Lasers/laserBlue01.png" id="2_v06x5"]
|
||||
[ext_resource type="AudioStream" uid="uid://bkmou1np8dpi6" path="res://assets/sounds/laser_fire.ogg" id="3_bsx87"]
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_odhrn"]
|
||||
radius = 3.0
|
||||
|
|
@ -11,16 +12,19 @@ height = 56.0
|
|||
scale = Vector2(0.6, 0.6)
|
||||
collision_layer = 8
|
||||
collision_mask = 13
|
||||
script = ExtResource("1_ctmji")
|
||||
script = ExtResource("1_qm1lv")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CapsuleShape2D_odhrn")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_nq6d6")
|
||||
texture = ExtResource("2_v06x5")
|
||||
|
||||
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
|
||||
scale = Vector2(0.5, 2.75)
|
||||
|
||||
[node name="LaserSFX" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("3_bsx87")
|
||||
|
||||
[connection signal="area_entered" from="." to="." method="OnAreaEntered"]
|
||||
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_on_visible_on_screen_notifier_2d_screen_exited"]
|
||||
|
|
@ -1,8 +1,10 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://ckh362yqjkpi0"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://ckh362yqjkpi0"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/player.cs" id="1_lhmq0"]
|
||||
[ext_resource type="Script" path="res://script/entities/player.cs" id="1_lhmq0"]
|
||||
[ext_resource type="Texture2D" uid="uid://ofevjaw7ld0a" path="res://assets/Ships/Fighters/Player/Fighter/ShipBlue.png" id="2_guof5"]
|
||||
[ext_resource type="Script" path="res://script/camera.cs" id="3_ui7sm"]
|
||||
[ext_resource type="Script" path="res://script/util/camera.cs" id="3_ui7sm"]
|
||||
[ext_resource type="AudioStream" uid="uid://bkmou1np8dpi6" path="res://assets/sounds/laser_fire.ogg" id="4_sb852"]
|
||||
[ext_resource type="AudioStream" uid="uid://7jden56war5n" path="res://assets/sounds/ship_dmg.ogg" id="5_ae0ke"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_btpq3"]
|
||||
radius = 41.0488
|
||||
|
|
@ -25,3 +27,9 @@ position = Vector2(0, -58)
|
|||
script = ExtResource("3_ui7sm")
|
||||
|
||||
[node name="EffectSpawn" type="Node2D" parent="."]
|
||||
|
||||
[node name="LaserSFX" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("4_sb852")
|
||||
|
||||
[node name="DamageSFX" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("5_ae0ke")
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dx4wnk5okjs6x"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/ship.cs" id="1_u8ww1"]
|
||||
[ext_resource type="Texture2D" uid="uid://ofevjaw7ld0a" path="res://assets/Ships/Fighters/Player/Fighter/ShipBlue.png" id="2_fvvdf"]
|
||||
[ext_resource type="Script" path="res://script/entities/ship.cs" id="1_dmn7f"]
|
||||
[ext_resource type="Texture2D" uid="uid://ofevjaw7ld0a" path="res://assets/Ships/Fighters/Player/Fighter/ShipBlue.png" id="2_3ch5l"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_tndfm"]
|
||||
radius = 41.0488
|
||||
|
|
@ -9,13 +9,13 @@ radius = 41.0488
|
|||
[node name="Ship" type="CharacterBody2D"]
|
||||
collision_mask = 13
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_u8ww1")
|
||||
script = ExtResource("1_dmn7f")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_tndfm")
|
||||
|
||||
[node name="ShipSprite" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_fvvdf")
|
||||
texture = ExtResource("2_3ch5l")
|
||||
|
||||
[node name="LaserSpawn" type="Node2D" parent="."]
|
||||
position = Vector2(0, -58)
|
||||
|
|
@ -1,19 +1,19 @@
|
|||
[gd_scene load_steps=14 format=3 uid="uid://635xs5haibcn"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://ckh362yqjkpi0" path="res://scenes/player.tscn" id="1_1w06w"]
|
||||
[ext_resource type="Script" path="res://script/game.cs" id="1_dukjm"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6myj160l6vf8" path="res://scenes/hud.tscn" id="2_xbhg5"]
|
||||
[ext_resource type="PackedScene" uid="uid://dkyw6ve8ll885" path="res://scenes/game_over.tscn" id="2_xhmka"]
|
||||
[ext_resource type="Script" path="res://script/pause_controller.cs" id="3_3v5pd"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnvcics1ni4pa" path="res://scenes/asteroid.tscn" id="3_b8wlr"]
|
||||
[ext_resource type="PackedScene" uid="uid://bc52c4jrk6lo" path="res://scenes/upgrade_menu.tscn" id="5_p2w52"]
|
||||
[ext_resource type="Texture2D" uid="uid://bjxo7mbl7nert" path="res://assets/Starfield/starfield1.png" id="6_kn6se"]
|
||||
[ext_resource type="PackedScene" uid="uid://4fnk5c2nf6a1" path="res://scenes/border.tscn" id="7_p4rds"]
|
||||
[ext_resource type="Script" path="res://script/wavecontroller.cs" id="8_fhk4p"]
|
||||
[ext_resource type="PackedScene" uid="uid://btjj225d18y2q" path="res://scenes/pause_menu.tscn" id="8_tsx0g"]
|
||||
[ext_resource type="Script" path="res://script/system/game.cs" id="1_6gbqe"]
|
||||
[ext_resource type="PackedScene" uid="uid://b6myj160l6vf8" path="res://scenes/ui/hud.tscn" id="2_1vxhi"]
|
||||
[ext_resource type="Script" path="res://script/util/pause_controller.cs" id="3_n6fe7"]
|
||||
[ext_resource type="PackedScene" uid="uid://btjj225d18y2q" path="res://scenes/ui/pause_menu.tscn" id="4_52tew"]
|
||||
[ext_resource type="PackedScene" uid="uid://dkyw6ve8ll885" path="res://scenes/ui/game_over.tscn" id="5_f2efe"]
|
||||
[ext_resource type="PackedScene" uid="uid://bc52c4jrk6lo" path="res://scenes/ui/upgrade_menu.tscn" id="6_ok87t"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnvcics1ni4pa" path="res://scenes/entities/asteroid.tscn" id="7_xcalb"]
|
||||
[ext_resource type="Texture2D" uid="uid://bjxo7mbl7nert" path="res://assets/Starfield/starfield1.png" id="8_sbfvn"]
|
||||
[ext_resource type="PackedScene" uid="uid://4fnk5c2nf6a1" path="res://scenes/system/border.tscn" id="9_o645r"]
|
||||
[ext_resource type="Script" path="res://script/util/wavecontroller.cs" id="10_qtnp4"]
|
||||
[ext_resource type="PackedScene" uid="uid://ckh362yqjkpi0" path="res://scenes/entities/player.tscn" id="11_7i7a5"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_4rlyh"]
|
||||
texture = ExtResource("6_kn6se")
|
||||
texture = ExtResource("8_sbfvn")
|
||||
0:0/0 = 0
|
||||
1:0/0 = 0
|
||||
2:0/0 = 0
|
||||
|
|
@ -8060,12 +8060,12 @@ tile_size = Vector2i(40, 40)
|
|||
sources/1 = SubResource("TileSetAtlasSource_4rlyh")
|
||||
|
||||
[node name="Game" type="Node2D"]
|
||||
script = ExtResource("1_dukjm")
|
||||
script = ExtResource("1_6gbqe")
|
||||
|
||||
[node name="UI" type="CanvasLayer" parent="."]
|
||||
process_mode = 2
|
||||
|
||||
[node name="HUD" parent="UI" instance=ExtResource("2_xbhg5")]
|
||||
[node name="HUD" parent="UI" instance=ExtResource("2_1vxhi")]
|
||||
|
||||
[node name="PauseControl" type="Control" parent="UI"]
|
||||
process_mode = 3
|
||||
|
|
@ -8075,9 +8075,9 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("3_3v5pd")
|
||||
script = ExtResource("3_n6fe7")
|
||||
|
||||
[node name="PauseMenu" parent="UI/PauseControl" instance=ExtResource("8_tsx0g")]
|
||||
[node name="PauseMenu" parent="UI/PauseControl" instance=ExtResource("4_52tew")]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
|
|
@ -8090,12 +8090,12 @@ offset_top = -100.0
|
|||
offset_right = 200.0
|
||||
offset_bottom = 100.0
|
||||
|
||||
[node name="GameOver" parent="UI/PauseControl" instance=ExtResource("2_xhmka")]
|
||||
[node name="GameOver" parent="UI/PauseControl" instance=ExtResource("5_f2efe")]
|
||||
process_mode = 2
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
|
||||
[node name="UpgradeMenu" parent="UI" node_paths=PackedStringArray("PlayerNode") instance=ExtResource("5_p2w52")]
|
||||
[node name="UpgradeMenu" parent="UI" node_paths=PackedStringArray("PlayerNode") instance=ExtResource("6_ok87t")]
|
||||
visible = false
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
|
|
@ -8114,19 +8114,19 @@ process_mode = 1
|
|||
[node name="Asteroids" type="Node" parent="."]
|
||||
process_mode = 1
|
||||
|
||||
[node name="Asteroid" parent="Asteroids" instance=ExtResource("3_b8wlr")]
|
||||
[node name="Asteroid" parent="Asteroids" instance=ExtResource("7_xcalb")]
|
||||
position = Vector2(1228, 195)
|
||||
|
||||
[node name="Asteroid2" parent="Asteroids" instance=ExtResource("3_b8wlr")]
|
||||
[node name="Asteroid2" parent="Asteroids" instance=ExtResource("7_xcalb")]
|
||||
position = Vector2(332, 661)
|
||||
|
||||
[node name="Asteroid3" parent="Asteroids" instance=ExtResource("3_b8wlr")]
|
||||
[node name="Asteroid3" parent="Asteroids" instance=ExtResource("7_xcalb")]
|
||||
position = Vector2(1450, 641)
|
||||
|
||||
[node name="Asteroid4" parent="Asteroids" instance=ExtResource("3_b8wlr")]
|
||||
[node name="Asteroid4" parent="Asteroids" instance=ExtResource("7_xcalb")]
|
||||
position = Vector2(769, 202)
|
||||
|
||||
[node name="Asteroid5" parent="Asteroids" instance=ExtResource("3_b8wlr")]
|
||||
[node name="Asteroid5" parent="Asteroids" instance=ExtResource("7_xcalb")]
|
||||
position = Vector2(387, 230)
|
||||
|
||||
[node name="BackgroundTileMap" type="TileMap" parent="."]
|
||||
|
|
@ -8138,24 +8138,24 @@ layer_0/tile_data = PackedInt32Array(-1966137, 2162689, 53, -1900601, 2162689, 5
|
|||
[node name="Border" type="Node" parent="."]
|
||||
process_mode = 1
|
||||
|
||||
[node name="BorderBottom" parent="Border" instance=ExtResource("7_p4rds")]
|
||||
[node name="BorderBottom" parent="Border" instance=ExtResource("9_o645r")]
|
||||
position = Vector2(994, 2618)
|
||||
scale = Vector2(60, 5)
|
||||
collision_layer = 8
|
||||
|
||||
[node name="BorderTop" parent="Border" instance=ExtResource("7_p4rds")]
|
||||
[node name="BorderTop" parent="Border" instance=ExtResource("9_o645r")]
|
||||
position = Vector2(995, -1616)
|
||||
rotation = 3.14159
|
||||
scale = Vector2(60, 5)
|
||||
collision_layer = 8
|
||||
|
||||
[node name="BorderLeft" parent="Border" instance=ExtResource("7_p4rds")]
|
||||
[node name="BorderLeft" parent="Border" instance=ExtResource("9_o645r")]
|
||||
position = Vector2(-1755, 501)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(37.35, 5)
|
||||
collision_layer = 8
|
||||
|
||||
[node name="BorderRight" parent="Border" instance=ExtResource("7_p4rds")]
|
||||
[node name="BorderRight" parent="Border" instance=ExtResource("9_o645r")]
|
||||
position = Vector2(3745, 501)
|
||||
rotation = -1.5708
|
||||
scale = Vector2(37.35, 5)
|
||||
|
|
@ -8163,14 +8163,14 @@ collision_layer = 8
|
|||
|
||||
[node name="WaveController" type="Node2D" parent="." node_paths=PackedStringArray("UpgradeMenu")]
|
||||
process_mode = 1
|
||||
script = ExtResource("8_fhk4p")
|
||||
script = ExtResource("10_qtnp4")
|
||||
UpgradeMenu = NodePath("../UI/UpgradeMenu")
|
||||
|
||||
[node name="Ships" type="Node" parent="WaveController"]
|
||||
|
||||
[node name="Friendly" type="Node" parent="WaveController/Ships"]
|
||||
|
||||
[node name="Player" parent="WaveController/Ships/Friendly" instance=ExtResource("1_1w06w")]
|
||||
[node name="Player" parent="WaveController/Ships/Friendly" instance=ExtResource("11_7i7a5")]
|
||||
position = Vector2(959, 539)
|
||||
scale = Vector2(0.6, 0.6)
|
||||
Color = 1
|
||||
|
|
@ -8202,11 +8202,6 @@ position = Vector2(1921, 1512)
|
|||
[node name="FSpawn3" type="Marker2D" parent="WaveController/Spawns/Friendly"]
|
||||
position = Vector2(1279, -637)
|
||||
|
||||
[connection signal="Exploded" from="Asteroids/Asteroid" to="." method="OnAsteroidExploded"]
|
||||
[connection signal="Exploded" from="Asteroids/Asteroid2" to="." method="OnAsteroidExploded"]
|
||||
[connection signal="Exploded" from="Asteroids/Asteroid3" to="." method="OnAsteroidExploded"]
|
||||
[connection signal="Exploded" from="Asteroids/Asteroid4" to="." method="OnAsteroidExploded"]
|
||||
[connection signal="Exploded" from="Asteroids/Asteroid5" to="." method="OnAsteroidExploded"]
|
||||
[connection signal="HealthUpdate" from="WaveController/Ships/Friendly/Player" to="." method="OnPlayerHealthUpdate"]
|
||||
[connection signal="LaserShot" from="WaveController/Ships/Friendly/Player" to="." method="OnPlayerLaserShot"]
|
||||
[connection signal="PlayerDeath" from="WaveController/Ships/Friendly/Player" to="." method="OnPlayerDeath"]
|
||||
|
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
|
|
@ -3,15 +3,15 @@
|
|||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://my2essq6mhxa"
|
||||
path="res://.godot/imported/starfield1.png-5ed8bd185a54ef194c7756d5a9b1188c.ctex"
|
||||
path="res://.godot/imported/starfield1.png-e59b1d493359003a2fb46239c1cadd7e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/starfield1.png"
|
||||
dest_files=["res://.godot/imported/starfield1.png-5ed8bd185a54ef194c7756d5a9b1188c.ctex"]
|
||||
source_file="res://scenes/system/starfield1.png"
|
||||
dest_files=["res://.godot/imported/starfield1.png-e59b1d493359003a2fb46239c1cadd7e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://dkyw6ve8ll885"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://dkyw6ve8ll885"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://be6xxaq8drt5q" path="res://assets/Fonts/Kenney Pixel Square.ttf" id="1_gbk3f"]
|
||||
[ext_resource type="Script" path="res://script/game_over.cs" id="1_mvgnc"]
|
||||
[ext_resource type="Script" path="res://script/ui/game_over.cs" id="1_mvgnc"]
|
||||
[ext_resource type="FontFile" uid="uid://dtpvg4lmre10g" path="res://assets/Fonts/Kenney Future Narrow.ttf" id="2_65i3g"]
|
||||
[ext_resource type="AudioStream" uid="uid://d4ebqwhtvkwvd" path="res://scenes/ui/ship_explode.ogg" id="4_am7ef"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_6mqtv"]
|
||||
font = ExtResource("1_gbk3f")
|
||||
|
|
@ -68,3 +69,6 @@ text = "Main Menu
|
|||
visibility_layer = 0
|
||||
custom_minimum_size = Vector2(0, 30)
|
||||
layout_mode = 2
|
||||
|
||||
[node name="ExplodeSFX" type="AudioStreamPlayer2D" parent="."]
|
||||
stream = ExtResource("4_am7ef")
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://b6myj160l6vf8"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/hud.cs" id="1_aksh1"]
|
||||
[ext_resource type="LabelSettings" uid="uid://lnjklxelhfuv" path="res://scenes/hud.tres" id="2_ns78v"]
|
||||
[ext_resource type="Script" path="res://script/ui/hud.cs" id="1_aksh1"]
|
||||
[ext_resource type="LabelSettings" uid="uid://lnjklxelhfuv" path="res://scenes/ui/hud.tres" id="2_ns78v"]
|
||||
|
||||
[node name="HUD" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://01tjlnox4crb"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/input_menu.cs" id="1_u13wa"]
|
||||
[ext_resource type="Script" path="res://script/ui/input_menu.cs" id="1_a0rq2"]
|
||||
|
||||
[node name="InputMenu" type="CenterContainer"]
|
||||
anchors_preset = 8
|
||||
|
|
@ -14,7 +14,7 @@ offset_right = 200.0
|
|||
offset_bottom = 250.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_u13wa")
|
||||
script = ExtResource("1_a0rq2")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
custom_minimum_size = Vector2(400, 500)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://bh3heupvlc1ok"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/main_menu.cs" id="1_wxwq5"]
|
||||
[ext_resource type="PackedScene" uid="uid://01tjlnox4crb" path="res://scenes/input_menu.tscn" id="2_2h615"]
|
||||
[ext_resource type="PackedScene" uid="uid://fwvsy2g3lj4f" path="res://scenes/ship_choice.tscn" id="3_the1x"]
|
||||
[ext_resource type="Script" path="res://script/ui/main_menu.cs" id="1_wxwq5"]
|
||||
[ext_resource type="PackedScene" uid="uid://01tjlnox4crb" path="res://scenes/ui/input_menu.tscn" id="2_2h615"]
|
||||
[ext_resource type="PackedScene" uid="uid://fwvsy2g3lj4f" path="res://scenes/ui/ship_choice.tscn" id="3_the1x"]
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://btjj225d18y2q"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://be6xxaq8drt5q" path="res://assets/Fonts/Kenney Pixel Square.ttf" id="1_b7j7x"]
|
||||
[ext_resource type="Script" path="res://script/pause_menu.cs" id="1_mq0ks"]
|
||||
[ext_resource type="PackedScene" uid="uid://01tjlnox4crb" path="res://scenes/input_menu.tscn" id="2_ugxyj"]
|
||||
[ext_resource type="Script" path="res://script/ui/pause_menu.cs" id="1_mq0ks"]
|
||||
[ext_resource type="PackedScene" uid="uid://01tjlnox4crb" path="res://scenes/ui/input_menu.tscn" id="2_ugxyj"]
|
||||
[ext_resource type="FontFile" uid="uid://dtpvg4lmre10g" path="res://assets/Fonts/Kenney Future Narrow.ttf" id="3_p0x5a"]
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_6mqtv"]
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://fwvsy2g3lj4f"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/ship_choice.cs" id="1_bn5x2"]
|
||||
[ext_resource type="Script" path="res://script/ui/ship_choice.cs" id="1_bn5x2"]
|
||||
[ext_resource type="FontFile" uid="uid://be6xxaq8drt5q" path="res://assets/Fonts/Kenney Pixel Square.ttf" id="2_kov8d"]
|
||||
[ext_resource type="FontFile" uid="uid://dtpvg4lmre10g" path="res://assets/Fonts/Kenney Future Narrow.ttf" id="3_c045h"]
|
||||
|
||||
BIN
MB_FYP/scenes/ui/ship_explode.ogg
Normal file
BIN
MB_FYP/scenes/ui/ship_explode.ogg
Normal file
Binary file not shown.
19
MB_FYP/scenes/ui/ship_explode.ogg.import
Normal file
19
MB_FYP/scenes/ui/ship_explode.ogg.import
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[remap]
|
||||
|
||||
importer="oggvorbisstr"
|
||||
type="AudioStreamOggVorbis"
|
||||
uid="uid://d4ebqwhtvkwvd"
|
||||
path="res://.godot/imported/ship_explode.ogg-fd9bb85d9098e1cf8ddaa38fb22a5107.oggvorbisstr"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/ui/ship_explode.ogg"
|
||||
dest_files=["res://.godot/imported/ship_explode.ogg-fd9bb85d9098e1cf8ddaa38fb22a5107.oggvorbisstr"]
|
||||
|
||||
[params]
|
||||
|
||||
loop=false
|
||||
loop_offset=0
|
||||
bpm=0
|
||||
beat_count=0
|
||||
bar_beats=4
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://bc52c4jrk6lo"]
|
||||
|
||||
[ext_resource type="Script" path="res://script/upgrade_menu.cs" id="1_aupyl"]
|
||||
[ext_resource type="Script" path="res://script/ui/upgrade_menu.cs" id="1_aupyl"]
|
||||
[ext_resource type="FontFile" uid="uid://be6xxaq8drt5q" path="res://assets/Fonts/Kenney Pixel Square.ttf" id="1_rlo6h"]
|
||||
[ext_resource type="FontFile" uid="uid://dtpvg4lmre10g" path="res://assets/Fonts/Kenney Future Narrow.ttf" id="2_m2s84"]
|
||||
|
||||
|
|
@ -85,10 +85,12 @@ public partial class ai_fighter : ship
|
|||
UpdateHealthLabel(Health);
|
||||
}
|
||||
|
||||
protected override void Explode()
|
||||
protected override async void Explode()
|
||||
{
|
||||
int factionInt = (int)Faction;
|
||||
EmitSignal(SignalName.OnDeath, factionInt);
|
||||
GetNode<AudioStreamPlayer2D>("ExplodeSFX").Play();
|
||||
await ToSignal(GetTree().CreateTimer(0.5f), "timeout");
|
||||
QueueFree();
|
||||
}
|
||||
|
||||
|
|
@ -64,6 +64,7 @@ public partial class player : ship // Inherits from base ship class
|
|||
if (Health <= 0)
|
||||
{
|
||||
EmitSignal(SignalName.PlayerDeath);
|
||||
//etNode<AudioStreamPlayer2D>("ExplodeSFX").Play();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ public partial class ship : CharacterBody2D
|
|||
|
||||
protected int RotationDirection;
|
||||
|
||||
protected readonly PackedScene LaserScene = GD.Load<PackedScene>("res://scenes/laser.tscn");
|
||||
protected readonly PackedScene LaserScene = GD.Load<PackedScene>("res://scenes/entities/laser.tscn");
|
||||
|
||||
|
||||
protected virtual void ShootLaser()
|
||||
|
|
@ -55,6 +55,7 @@ public partial class ship : CharacterBody2D
|
|||
laser.Position = LaserSpawn.GlobalPosition + -Transform.Y * 25f;
|
||||
laser.Shooter = this;
|
||||
laser.Rotation = Rotation;
|
||||
GetNode<AudioStreamPlayer2D>("LaserSFX").Play();
|
||||
EmitSignal(SignalName.LaserShot, laser);
|
||||
}
|
||||
|
||||
|
|
@ -186,9 +187,12 @@ public partial class ship : CharacterBody2D
|
|||
Health -= damage;
|
||||
if (Health <= 0)
|
||||
{
|
||||
Health = 0;
|
||||
Explode();
|
||||
}
|
||||
GD.Print(Name, " health: ", Health);
|
||||
//GD.Print(Name, " health: ", Health);
|
||||
GetNode<AudioStreamPlayer2D>("DamageSFX").Play();
|
||||
|
||||
}
|
||||
|
||||
protected virtual void Explode()
|
||||
|
|
@ -36,7 +36,7 @@ public partial class game : Node2D
|
|||
private int _score;
|
||||
|
||||
|
||||
private readonly PackedScene _asteroidScene = GD.Load<PackedScene>("res://scenes/asteroid.tscn");
|
||||
private readonly PackedScene _asteroidScene = GD.Load<PackedScene>("res://scenes/entities/asteroid.tscn");
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
|
|
@ -198,6 +198,7 @@ public partial class game : Node2D
|
|||
{
|
||||
GetTree().Paused = true;
|
||||
GetNode<game_over>("UI/PauseControl/GameOver").Visible = true;
|
||||
GetNode<AudioStreamPlayer2D>("UI/PauseControl/GameOver/ExplodeSFX").Play();
|
||||
}
|
||||
|
||||
private void OnAIDeath(int factionInt)
|
||||
|
|
@ -9,13 +9,13 @@ public partial class game_over : CenterContainer
|
|||
{
|
||||
GetTree().Paused = false;
|
||||
Visible = false;
|
||||
GetTree().ChangeSceneToFile("res://scenes/game.tscn");
|
||||
GetTree().ChangeSceneToFile("res://scenes/system/game.tscn");
|
||||
};
|
||||
|
||||
GetNode<Button>("VBox/HBox/MainMenu").Pressed += () =>
|
||||
{
|
||||
GetTree().Paused = false;
|
||||
GetTree().ChangeSceneToFile("res://scenes/main_menu.tscn");
|
||||
GetTree().ChangeSceneToFile("res://scenes/ui/main_menu.tscn");
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ public partial class pause_menu : CenterContainer
|
|||
_quitButton.Pressed += () =>
|
||||
{
|
||||
GetTree().Paused = false;
|
||||
GetTree().ChangeSceneToFile("res://scenes/main_menu.tscn");
|
||||
GetTree().ChangeSceneToFile("res://scenes/ui/main_menu.tscn");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@ public partial class ship_choice : CenterContainer
|
|||
|
||||
//GD.Print("attempting start");
|
||||
|
||||
GetTree().ChangeSceneToFile("res://scenes/game.tscn");
|
||||
GetTree().ChangeSceneToFile("res://scenes/system/game.tscn");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -19,7 +19,7 @@ public partial class wavecontroller : Node2D
|
|||
private List<Marker2D> _enemySpawns;
|
||||
private List<Marker2D> _friendlySpawns;
|
||||
private PackedScene _aiShipScene;
|
||||
private string _aiShipPath = "res://scenes/ai_fighter.tscn";
|
||||
private string _aiShipPath = "res://scenes/entities/ai_fighter.tscn";
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
Loading…
Reference in a new issue