more hivemind tweaks and added enemy counter to level manager
This commit is contained in:
@@ -13,6 +13,8 @@ var ammo_reserve = [0]
|
||||
var guns_dict = {}
|
||||
var current_gun_index
|
||||
var particle_number = 0
|
||||
var enemy_hiveminds = []
|
||||
var remaining_enemies
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
@@ -34,10 +36,16 @@ func _ready():
|
||||
# Spawn first gun
|
||||
current_gun_index = 0
|
||||
gun_spawn(0)
|
||||
|
||||
#find enemy hiveminds
|
||||
for node in get_tree().get_nodes_in_group("enemy_hivemind"):
|
||||
enemy_hiveminds.append(node)
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(_delta):
|
||||
pass
|
||||
for hivemind in enemy_hiveminds:
|
||||
remaining_enemies = hivemind.minions.size()
|
||||
print("remaining enemies: " + str(remaining_enemies))
|
||||
|
||||
func gun_spawn(index):
|
||||
#loop around if scrolling past available guns
|
||||
|
||||
Reference in New Issue
Block a user