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:
parent
9621323983
commit
40ffbb84cd
8 changed files with 135 additions and 17 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue