Added weapons and fixed others

This commit is contained in:
Marco 2025-08-14 10:58:54 +02:00
commit 400123a447
20 changed files with 185 additions and 67 deletions

View file

@ -159,11 +159,10 @@ public partial class Weapon3D : Node3D
if (GameController.Instance.Player.Storage.Shield.CurrentResource >= WeaponData.AmmoPerShot)
{
GameController.Instance.Player.Storage.Shield.CurrentResource -= WeaponData.AmmoPerShot;
return true;
}
else
{
EmitSignalEmpty();
}
EmitSignalEmpty();
_cooldownTimer.Start(WeaponData?.RateOfFire ?? 0);
return false;
}
@ -255,7 +254,7 @@ public partial class Weapon3D : Node3D
//
// }
if (_ammoType is WeaponAmmoType.Ammo && WeaponData.AutoReload)
if (_ammoType is WeaponAmmoType.Ammo && WeaponData.AutoReload && LoadedAmmo < WeaponData.AmmoPerShot)
{
Reload();
}