Beeg checkin

This commit is contained in:
2023-09-06 03:49:16 -07:00
parent f180d4cacd
commit f8cca640a6
320 changed files with 2751 additions and 26682 deletions

29
Player/Base/Projectile.cs Normal file
View File

@@ -0,0 +1,29 @@
using Godot;
public partial class Projectile : Node3D
{
[Export]
public double Cooldown { get; protected set; }
[Export]
public AudioStream _soundEffect;
public Controls ParentCharacter;
[Export]
private float _projectileSpeed = 1f;
public override void _Ready()
{
Speed = _projectileSpeed;
var sfxPlayer = GetTree().Root.GetNode<AudioStreamPlayer>("Main/SFXPlayer");
sfxPlayer.Stream = _soundEffect;
sfxPlayer.Play();
}
public float Speed { get; private set; }
public void OnTimeToLiveTimeout()
{
QueueFree();
}
}