added money and money counter
This commit is contained in:
@@ -14,7 +14,7 @@ var cycle_count
|
||||
@export var max_ammo = 15
|
||||
@export var start_mags = 3
|
||||
@export var bullet_damage = 1
|
||||
@export var kick_amount = 1
|
||||
@export var bullet_force_mod = 5.0
|
||||
@export var bullet_speed = 150
|
||||
@export var bullet_drop = .3
|
||||
@export var random_spread_amt = 1.0
|
||||
@@ -75,11 +75,11 @@ func reload_finished():
|
||||
if level_control.ammo_reserve[gun_index] >= max_ammo:
|
||||
level_control.ammo_current[gun_index] += max_ammo
|
||||
level_control.ammo_reserve[gun_index] -= max_ammo
|
||||
player.reloading = false
|
||||
#player.reloading = false
|
||||
else:
|
||||
level_control.ammo_current[gun_index] += level_control.ammo_reserve[gun_index]
|
||||
level_control.ammo_reserve[gun_index] -= level_control.ammo_reserve[gun_index]
|
||||
player.reloading = false
|
||||
#player.reloading = false
|
||||
|
||||
func shoot(player,delta):
|
||||
|
||||
@@ -103,8 +103,8 @@ func shoot(player,delta):
|
||||
instance_bullet.bullet_drop = bullet_drop
|
||||
instance_bullet.random_spread_amt = random_spread_amt
|
||||
instance_bullet.bullet_damage = bullet_damage
|
||||
instance_bullet.bullet_force_mod = bullet_force_mod
|
||||
instance_bullet.instance_bullethole = bullethole.instantiate()
|
||||
instance_bullet.gun = self
|
||||
get_tree().get_root().add_child(instance_bullet)
|
||||
|
||||
# Casing transform
|
||||
@@ -121,8 +121,8 @@ func shoot(player,delta):
|
||||
audio_empty.play()
|
||||
|
||||
func reload(player,delta):
|
||||
if level_control.ammo_current[gun_index] < max_ammo and player.reloading == false and level_control.ammo_reserve[gun_index] > 0:
|
||||
player.reloading = true
|
||||
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:
|
||||
#player.reloading = true
|
||||
anim_player.play("reload")
|
||||
audio_reload.play()
|
||||
if anim_player.is_playing() and anim_player.current_animation == "reload":
|
||||
|
||||
Reference in New Issue
Block a user