mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Shooting
This commit is contained in:
parent
1229613def
commit
341f76d885
17 changed files with 156 additions and 55 deletions
|
|
@ -5,7 +5,7 @@ using Godot;
|
|||
|
||||
namespace Cirno.Scripts.Weapons;
|
||||
|
||||
public partial class Weapon3D : Node
|
||||
public partial class Weapon3D : Node3D
|
||||
{
|
||||
[Export]
|
||||
public WeaponResource WeaponData { get; set; }
|
||||
|
|
@ -103,18 +103,18 @@ public partial class Weapon3D : Node
|
|||
}
|
||||
|
||||
// Check for battery if it's used
|
||||
if (UsesBattery)
|
||||
{
|
||||
if (GameManager.Instance.Player.Shield.CurrentResource >= WeaponData.AmmoPerShot)
|
||||
{
|
||||
GameManager.Instance.Player.Shield.CurrentResource -= WeaponData.AmmoPerShot;
|
||||
}
|
||||
else
|
||||
{
|
||||
EmitSignalEmpty();
|
||||
return;
|
||||
}
|
||||
}
|
||||
// if (UsesBattery)
|
||||
// {
|
||||
// if (GameManager.Instance.Player.Shield.CurrentResource >= WeaponData.AmmoPerShot)
|
||||
// {
|
||||
// GameManager.Instance.Player.Shield.CurrentResource -= WeaponData.AmmoPerShot;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// EmitSignalEmpty();
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
// Out of ammo?
|
||||
if (LoadedAmmo < WeaponData.AmmoPerShot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue