Weapon sounds

This commit is contained in:
Marco 2025-04-08 17:59:20 +02:00
commit 3c531bbe04
14 changed files with 174 additions and 52 deletions

View file

@ -29,16 +29,15 @@ public partial class WeaponResource : Resource
[Export] public bool InfiniteAmmo = true;
[Export] public StringName ItemKey;
[Export] public StringName AmmoKey;
#region Bullet spawn data
[ExportCategory("Bullet Spawn Data")]
[Export] public int BulletsPerShot = 1;
[Export] public float SpreadAngle = 0f;
[Export] public float RandomSpread = 0f;
[Export] public StringName ItemKey;
#region Bullet spawn data
[Export] public StringName AmmoKey;
[Export] public float RandomSpread = 0f;
//[Export] public float BulletSpeed = 100f;
//[Export] public float BulletDamage = 1;
//[Export] public float LifeTime = 10f;
@ -49,6 +48,11 @@ public partial class WeaponResource : Resource
//[Export] private Array<Resource> _timeModifiers;
#endregion
[ExportCategory("Sounds")]
[Export] public AudioStream ReloadSound { get; set; }
[Export] public AudioStream ShootSound { get; set; }
[Export] public AudioStream EmptySound { get; set; }
public BulletInfo MakeBullet(Vector2 position)
{