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

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; }