instancing start gun and assigned ammo to array

This commit is contained in:
derek
2024-07-15 12:50:48 -05:00
parent 4da08f3df5
commit 06b8229db1
3 changed files with 9 additions and 14 deletions

View File

@@ -1,14 +1,6 @@
extends Node3D
<<<<<<< Updated upstream
var current_weapon = null
var weapon_stack = []
var weapon_indicator = 0
var next_weapon : String
var weapon_list = {}
@export var weapon_resources : Array[weapon_resource]
=======
@export var player : Node
@export var gun_1 : Resource
@export var gun_2 : Resource
@@ -17,12 +9,11 @@ var ammo_current = [0,0]
var ammo_reserve = [0,0]
var guns_dict = {}
var current_gun_index
>>>>>>> Stashed changes
# Called when the node enters the scene tree for the first time.
func _ready():
held_guns = [gun_1,gun_2]
var instance_gun = held_guns[0].instantiate()
var instance_gun_2 = held_guns[1].instantiate()
ammo_current[1] = instance_gun_2.max_ammo