This commit is contained in:
PfandBoss
2022-12-10 03:18:55 +01:00
parent 0b64014d01
commit 701f0bfee9
2 changed files with 10 additions and 3 deletions

View File

@@ -9,15 +9,15 @@ enum TYPE {AMMO, GUNPOWDER, FUEL}
#------------Methods-------------#
func _ready():
var root = get_tree().root.get_child(0)
root.shooting.connect(_on_signal_storing)
root.ammo_pickup.connect(_on_signal_storing)
maxStashValue = 5
currentStashValue = 0
func interact():
if currentStashValue >= 1:
currentStashValue -= 1
--currentStashValue
return
func _on_signal_storing():
if currentStashValue < maxStashValue:
currentStashValue += 1
++currentStashValue
return