This commit is contained in:
2023-09-04 22:09:56 -07:00
parent d0ea3eeec1
commit 64f5ec8a5d
19 changed files with 221 additions and 30 deletions

Binary file not shown.

View File

@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cp787gdbhccb1"
path="res://.godot/imported/02 MovinOn.mp3-9ee085070ee763b5e5fda860f33a13f2.mp3str"
[deps]
source_file="res://Audio/BGM/02 MovinOn.mp3"
dest_files=["res://.godot/imported/02 MovinOn.mp3-9ee085070ee763b5e5fda860f33a13f2.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
Audio/BGM/lb.wav Normal file

Binary file not shown.

24
Audio/BGM/lb.wav.import Normal file
View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ddboe5h44jwdy"
path="res://.godot/imported/lb.wav-970d9e2cfa8e36cf78046fec7343108d.sample"
[deps]
source_file="res://Audio/BGM/lb.wav"
dest_files=["res://.godot/imported/lb.wav-970d9e2cfa8e36cf78046fec7343108d.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
Audio/BGM/level theme.wav Normal file

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dxi5xjgj5i6de"
path="res://.godot/imported/level theme.wav-17a0a4eee61c358a4980ac9e5fdc5961.sample"
[deps]
source_file="res://Audio/BGM/level theme.wav"
dest_files=["res://.godot/imported/level theme.wav-17a0a4eee61c358a4980ac9e5fdc5961.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
Audio/SFX/select.wav Normal file

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://bgnjk7mu51bon"
path="res://.godot/imported/select.wav-2635c7b58e339437700447f3d280ad9e.sample"
[deps]
source_file="res://Audio/SFX/select.wav"
dest_files=["res://.godot/imported/select.wav-2635c7b58e339437700447f3d280ad9e.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

BIN
Audio/SFX/shooting.wav Normal file

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://j8p1uq8xgote"
path="res://.godot/imported/shooting.wav-4967743545d2cccc1eb9a59a59c75130.sample"
[deps]
source_file="res://Audio/SFX/shooting.wav"
dest_files=["res://.godot/imported/shooting.wav-4967743545d2cccc1eb9a59a59c75130.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

File diff suppressed because one or more lines are too long

24
Scenes/Levels/Level3.cs Normal file
View File

@@ -0,0 +1,24 @@
using Godot;
public partial class Level3 : Node3D
{
private int _numberOfHits = 3;
private MeshInstance3D _door;
public override void _Ready()
{
_door = GetNode<MeshInstance3D>("Door");
}
private void OnDoorHit(Node3D node)
{
_numberOfHits--;
GD.Print(_numberOfHits);
if (_numberOfHits == 0)
{
_door.Hide();
_door.QueueFree();
_door = null;
}
}
}

View File

@@ -1,13 +1,61 @@
[gd_scene load_steps=4 format=3 uid="uid://btl5fdyjewnwc"]
[gd_scene load_steps=11 format=3 uid="uid://btl5fdyjewnwc"]
[ext_resource type="Script" path="res://Scenes/Levels/Level3.cs" id="1_88ujy"]
[ext_resource type="PackedScene" uid="uid://jgf7k1r35km1" path="res://Scenes/ExitPortal.tscn" id="3_2t766"]
[ext_resource type="PackedScene" uid="uid://6w3upp7ln4i4" path="res://Levels/Final Levels/Stage3/Stage3.tscn" id="3_gd7oi"]
[ext_resource type="Texture2D" uid="uid://cpku414yrxoil" path="res://Levels/Final Levels/Stage3/STAGE 3_hell.png" id="3_gsb68"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_j26hn"]
radius = 0.957319
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_kddvy"]
resource_name = "Material.002"
transparency = 2
alpha_scissor_threshold = 0.5
alpha_antialiasing_mode = 0
cull_mode = 2
vertex_color_use_as_albedo = true
albedo_texture = ExtResource("3_gsb68")
[sub_resource type="ArrayMesh" id="ArrayMesh_sjtoo"]
_surfaces = [{
"aabb": AABB(-0.598178, -0.942508, -1.08109, 1.19637, 1.88502, 2.16219),
"format": 4097,
"index_count": 36,
"index_data": PackedByteArray(1, 0, 3, 0, 4, 0, 1, 0, 0, 0, 3, 0, 0, 0, 7, 0, 2, 0, 0, 0, 1, 0, 7, 0, 3, 0, 2, 0, 5, 0, 3, 0, 0, 0, 2, 0, 4, 0, 5, 0, 6, 0, 4, 0, 3, 0, 5, 0, 6, 0, 2, 0, 7, 0, 6, 0, 5, 0, 2, 0, 1, 0, 6, 0, 7, 0, 1, 0, 4, 0, 6, 0),
"name": "Material.002",
"primitive": 3,
"vertex_count": 8,
"vertex_data": PackedByteArray(52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 63, 52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 191, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 63, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 63, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 191, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 63, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 191, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 191)
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_5vvrp"]
resource_name = "STAGE 3_Cube002"
_surfaces = [{
"aabb": AABB(-0.598178, -0.942508, -1.08109, 1.19637, 1.88502, 2.16219),
"attribute_data": PackedByteArray(123, 70, 64, 63, 16, 9, 84, 61, 222, 16, 108, 63, 128, 67, 10, 61, 186, 38, 62, 63, 16, 125, 67, 61, 1, 248, 104, 63, 16, 9, 84, 61, 143, 61, 73, 63, 192, 181, 240, 60, 186, 38, 62, 63, 232, 33, 44, 62, 123, 70, 64, 63, 240, 237, 22, 62, 196, 234, 104, 63, 144, 129, 3, 61, 222, 16, 108, 63, 58, 180, 114, 63, 112, 65, 166, 61, 128, 67, 10, 61, 104, 220, 86, 63, 16, 125, 67, 61, 209, 103, 107, 63, 56, 11, 157, 61, 129, 132, 100, 63, 192, 181, 240, 60, 104, 220, 86, 63, 232, 33, 44, 62, 217, 34, 82, 63, 56, 11, 157, 61, 49, 37, 79, 63, 144, 129, 3, 61, 112, 65, 166, 61, 58, 180, 114, 63, 209, 103, 107, 63, 224, 83, 11, 62, 49, 37, 79, 63, 92, 111, 33, 62, 129, 132, 100, 63, 232, 182, 20, 62, 217, 34, 82, 63, 224, 83, 11, 62, 1, 248, 104, 63, 240, 237, 22, 62, 196, 234, 104, 63, 92, 111, 33, 62, 143, 61, 73, 63, 232, 182, 20, 62),
"format": 4119,
"index_count": 36,
"index_data": PackedByteArray(5, 0, 10, 0, 13, 0, 5, 0, 2, 0, 10, 0, 0, 0, 21, 0, 6, 0, 0, 0, 3, 0, 21, 0, 9, 0, 8, 0, 16, 0, 9, 0, 1, 0, 8, 0, 14, 0, 17, 0, 20, 0, 14, 0, 11, 0, 17, 0, 18, 0, 7, 0, 22, 0, 18, 0, 15, 0, 7, 0, 4, 0, 19, 0, 23, 0, 4, 0, 12, 0, 19, 0),
"material": SubResource("StandardMaterial3D_kddvy"),
"name": "Material.002",
"primitive": 3,
"vertex_count": 24,
"vertex_data": PackedByteArray(52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 63, 0, 0, 255, 127, 255, 255, 255, 255, 52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 63, 255, 255, 255, 255, 255, 255, 255, 191, 52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 63, 255, 127, 255, 255, 0, 0, 255, 191, 52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 191, 0, 0, 255, 127, 255, 255, 255, 255, 52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 191, 255, 127, 255, 127, 0, 0, 255, 191, 52, 34, 25, 63, 46, 72, 113, 191, 21, 97, 138, 191, 255, 127, 255, 255, 0, 0, 255, 191, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 63, 0, 0, 255, 127, 255, 255, 255, 255, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 63, 255, 127, 0, 0, 255, 255, 255, 191, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 63, 255, 255, 255, 255, 255, 255, 255, 191, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 63, 255, 255, 255, 255, 255, 255, 255, 191, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 63, 255, 127, 255, 255, 0, 0, 255, 191, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 63, 255, 255, 255, 127, 255, 127, 255, 191, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 191, 255, 127, 255, 127, 0, 0, 255, 191, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 191, 255, 127, 255, 255, 0, 0, 255, 191, 44, 34, 25, 191, 46, 72, 113, 191, 21, 97, 138, 191, 255, 255, 255, 127, 255, 127, 255, 191, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 63, 255, 127, 0, 0, 255, 255, 255, 191, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 63, 255, 255, 255, 255, 255, 255, 255, 191, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 63, 255, 255, 255, 127, 255, 127, 255, 191, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 191, 255, 127, 0, 0, 255, 255, 255, 191, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 191, 255, 127, 255, 127, 0, 0, 255, 191, 44, 34, 25, 191, 46, 72, 113, 63, 21, 97, 138, 191, 255, 255, 255, 127, 255, 127, 255, 191, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 191, 0, 0, 255, 127, 255, 255, 255, 255, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 191, 255, 127, 0, 0, 255, 255, 255, 191, 52, 34, 25, 63, 46, 72, 113, 63, 21, 97, 138, 191, 255, 127, 255, 127, 0, 0, 255, 191)
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_sjtoo")
[sub_resource type="BoxShape3D" id="BoxShape3D_y36jq"]
size = Vector3(1.49912, 3.26269, 1.53642)
[sub_resource type="BoxShape3D" id="BoxShape3D_p3qq5"]
size = Vector3(1.49912, 3.26269, 1.53642)
[node name="Level3" type="Node3D" groups=["Level"]]
process_mode = 3
script = ExtResource("1_88ujy")
[node name="Area3D2" type="Area3D" parent="." groups=["Level"]]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.993156, -1.67434)
@@ -26,4 +74,25 @@ shape = SubResource("CylinderShape3D_j26hn")
[node name="STAGE 3" parent="." instance=ExtResource("3_gd7oi")]
transform = Transform3D(1.09, 0, 0, 0, 1.09, 0, 0, 0, 1.09, 0, 0, -0.528128)
[node name="Door" type="MeshInstance3D" parent="."]
transform = Transform3D(1.34815, -1.15924e-07, -1.92258e-08, 1.40447e-07, -0.805475, 0.0509621, 3.50909e-07, 0.767749, 0.0534663, -0.596952, 0.704511, 0.112544)
visible = false
mesh = SubResource("ArrayMesh_5vvrp")
skeleton = NodePath("")
[node name="Area3D" type="Area3D" parent="Door"]
transform = Transform3D(-0.999999, 4.26326e-14, 8.74227e-08, 0, 1, 0, -8.74229e-08, 0, -1, -0.63182, 0.554992, 1.04925)
collision_mask = 2
[node name="CollisionShape3D" type="CollisionShape3D" parent="Door/Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.617342, -0.369574, 0.0782603)
shape = SubResource("BoxShape3D_y36jq")
[node name="StaticBody3D" type="StaticBody3D" parent="Door/Area3D"]
[node name="CollisionShape3D" type="CollisionShape3D" parent="Door/Area3D/StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.636094, 0, 0.070637)
shape = SubResource("BoxShape3D_p3qq5")
[connection signal="body_entered" from="Area3D2" to="." method="OnExitEntered"]
[connection signal="body_entered" from="Door/Area3D" to="." method="OnDoorHit"]

View File

@@ -20,3 +20,6 @@ GameManager = ExtResource("11_wiyvp")
[node name="MainMenu" parent="." instance=ExtResource("2_kvovw")]
z_index = 100
[node name="SFXPlayer" type="AudioStreamPlayer" parent="."]
max_polyphony = 10

View File

@@ -37,6 +37,7 @@ offset_right = 420.0
offset_bottom = 540.0
grow_vertical = 2
texture = ExtResource("4_xa2n6")
stretch_mode = 2
[node name="SidebarLeft2" type="TextureRect" parent="."]
layout_mode = 1

View File

@@ -6,5 +6,8 @@ public partial class FinalLevel : Node3D
{
var finalBossGUI = GetTree().GetFirstNodeInGroup("BossGUI") as Control;
finalBossGUI.Show();
var bgmPlayer = GetTree().Root.GetNode<BGMPlayer>("BgmPlayer");
bgmPlayer.SetBGMFromFilepath("Audio/BGM/lb.wav");
bgmPlayer.PlayBGM();
}
}

View File

@@ -61,6 +61,10 @@ public partial class GameManager : Node
public void OnCharacterSelected(Player player)
{
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
var audioStream = ResourceLoader.Load<AudioStream>("Audio/SFX/select.wav");
sfxPlayer.Stream = audioStream;
sfxPlayer.Play();
GD.Print("Instancing...");
var names = player.CharactersLeftOnStage.Select(x => x.Name).ToArray();
GD.Print(names);

View File

@@ -26,6 +26,11 @@ public partial class Main : Node
if (numberOfPlayers == 2)
gameManagerInstance.OnHandleCharacterSelectUI(gameManagerInstance.Players.ElementAt(1));
var bgmPlayer = GetTree().Root.GetNode<BGMPlayer>("BgmPlayer");
bgmPlayer.ProcessMode = ProcessModeEnum.Always;
bgmPlayer.SetBGMFromFilepath("Audio/BGM/level theme.wav");
bgmPlayer.PlayBGM();
GetTree().Paused = true;
}

View File

@@ -1,4 +1,5 @@
using Godot;
using System.IO;
public partial class Projectile : Node3D
{
@@ -11,6 +12,10 @@ public partial class Projectile : Node3D
public override void _Ready()
{
Speed = _projectileSpeed;
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
var audioStream = ResourceLoader.Load<AudioStream>("Audio/SFX/shooting.wav");
sfxPlayer.Stream = audioStream;
sfxPlayer.Play();
}
public float Speed { get; private set; }