added weapon holstering
This commit is contained in:
@@ -134,16 +134,17 @@ func gun_spawn(index):
|
||||
|
||||
current_gun_index = index
|
||||
|
||||
var instance_gun = held_guns[index].instantiate()
|
||||
instance_gun.global_transform.origin = player.weapon_spawner.position
|
||||
player.gun = instance_gun
|
||||
player.def_weapon_holder_pos = player.weapon_holder.position
|
||||
player.ammo = player.gun.max_ammo
|
||||
player.ammo_reserve = player.gun.max_ammo * player.gun.start_mags
|
||||
#player.gun_fire_pitch_starting = player.gun.audio_fire.pitch_scale
|
||||
instance_gun.gun_index = index
|
||||
instance_gun.anim_player.play("swap_in")
|
||||
player.weapon_holder.add_child(instance_gun)
|
||||
if held_guns != []:
|
||||
var instance_gun = held_guns[index].instantiate()
|
||||
instance_gun.global_transform.origin = player.weapon_spawner.position
|
||||
player.gun = instance_gun
|
||||
player.def_weapon_holder_pos = player.weapon_holder.position
|
||||
player.ammo = player.gun.max_ammo
|
||||
player.ammo_reserve = player.gun.max_ammo * player.gun.start_mags
|
||||
#player.gun_fire_pitch_starting = player.gun.audio_fire.pitch_scale
|
||||
instance_gun.gun_index = index
|
||||
instance_gun.anim_player.play("swap_in")
|
||||
player.weapon_holder.add_child(instance_gun)
|
||||
|
||||
func enemy_count():
|
||||
var sum = 0
|
||||
|
||||
Reference in New Issue
Block a user