instancing start gun and assigned ammo to array
This commit is contained in:
@@ -36,13 +36,16 @@ var cycle_count
|
||||
|
||||
@onready var player = $"../../../../"
|
||||
var rng = RandomNumberGenerator.new()
|
||||
var level_control
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
start_position = self.position
|
||||
start_rotation = self.rotation
|
||||
random_spread_start = random_spread_amt
|
||||
|
||||
|
||||
level_control = get_tree().get_root()
|
||||
|
||||
if fire_mode == 0:
|
||||
cycle_count = 1
|
||||
cycle_count_start = 1
|
||||
@@ -103,7 +106,7 @@ func shoot(player,delta):
|
||||
instance_casing.transform.basis = casing_ejector.global_transform.basis
|
||||
get_tree().get_root().add_child(instance_casing)
|
||||
|
||||
if fire_mode == 1 or fire_mode == 2:
|
||||
if fire_mode != 0:
|
||||
cycle_count -= 1
|
||||
|
||||
elif !anim_player.is_playing() and cycle_count != 0:
|
||||
|
||||
Reference in New Issue
Block a user