turret tweaks
This commit is contained in:
@@ -124,7 +124,7 @@ func reload_finished():
|
||||
await get_tree().create_timer(.01).timeout
|
||||
player.reloading = false
|
||||
|
||||
func shoot(player,delta):
|
||||
func shoot(delta):
|
||||
if level_control.ammo_current[gun_index] > 0 and cycle_count > 0:
|
||||
if !anim_player.is_playing():
|
||||
level_control.ammo_current[gun_index] -= 1
|
||||
@@ -159,7 +159,7 @@ func fire(delta):
|
||||
chamber.rotate_object_local(Vector3(0,-1,0),deg_to_rad(60))
|
||||
|
||||
|
||||
func reload(player,delta):
|
||||
func reload(delta):
|
||||
if level_control.ammo_current[gun_index] < max_ammo and player.gun.anim_player.get_current_animation() != "reload" and level_control.ammo_reserve[gun_index] > 0:
|
||||
anim_player.play("reload")
|
||||
audio_reload.play()
|
||||
|
||||
Reference in New Issue
Block a user