added money and money counter

This commit is contained in:
derek
2024-07-17 12:22:05 -05:00
parent 119d12b3da
commit a917dd2c88
17 changed files with 217 additions and 31 deletions

View File

@@ -15,6 +15,7 @@ var cycle_count
@export var start_mags = 3
@export var bullet_damage = 1
@export var kick_amount = 1
@export var bullet_force_mod = 5
@export var bullet_speed = 150
@export var bullet_drop = .3
@export var random_spread_amt = 1.0
@@ -150,16 +151,15 @@ func fire(delta):
instance_bullet.bullet_drop = bullet_drop
instance_bullet.bullet_damage = bullet_damage
instance_bullet.random_spread_amt = random_spread_amt
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)
player.weapon_recoil()
chamber.rotate_object_local(Vector3(0,-1,0),deg_to_rad(60))
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:
anim_player.play("reload")
audio_reload.play()
for i in bullet_array: