mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Added weapons and fixed others
This commit is contained in:
parent
8d5f1783e9
commit
400123a447
20 changed files with 185 additions and 67 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue