Added in editor warnings when weapons are missing components (Audioplayer, Shot spawn location, projectile PackedScene)

Added functionality for weapons to fire projectiles.
This commit is contained in:
KingGurke 2025-04-03 12:26:41 +02:00
parent 9621323983
commit 40ffbb84cd
8 changed files with 135 additions and 17 deletions

View file

@ -59,7 +59,8 @@ func _physics_process(delta: float) -> void:
rotation = tilt
func shoot(index):
if weapons.size() > index:
#print_debug("trying to shoot weapon ", index, " out of ", )
if index < weapons.size():
weapons[index].shoot()
func deal_damage(amount):