juiced the camera a bit and limited weapon ammo

This commit is contained in:
2023-11-27 13:52:46 +11:00
parent f631654626
commit 66f7131c1b
28 changed files with 406 additions and 124 deletions

View File

@@ -44,7 +44,9 @@ func _process(delta: float) -> void:
func release_trigger():
super.release_trigger()
if targets.size() > 0 and time_since_firing >= time_between_shots:
if targets.size() > 0 and current_energy >= energy_cost and time_since_firing >= time_between_shots:
current_energy -= energy_cost
energy_changed.emit(current_energy)
time_since_firing -= time_between_shots
shoot()