Bee flying animation, dancing drone

This commit is contained in:
Dan Baker 2024-05-03 20:39:41 +01:00
parent 7c3bca07f9
commit bce75a9a97
13 changed files with 154 additions and 21 deletions

View file

@ -16,13 +16,13 @@ func _ready():
func spawn_bee():
var bee_instance = bee.instantiate()
add_child(bee_instance)
bee_instance.position = beehive.position
bee_instance.position = beehive.global_position
# bee_instance.connect("bee_died", self, "bee_died")
func _process(delta):
spawn_timer += delta
if spawn_timer > spawn_interval and bee_count < max_bees:
if spawn_timer > spawn_interval and bee_count < max_bees and beehive.dancer_in_range:
spawn_bee()
spawn_timer = 0.0
bee_count += 1

View file

@ -90,6 +90,12 @@ func update_director_drone_list():
Log.pr(director_drones.size())
func get_director(drone_number : int) -> DirectorDrone:
for drone in director_drones:
if drone.visit_order == drone_number:
return drone
return null
func get_next_director(current_director_number : int) -> DirectorDrone:
for drone in director_drones:
if drone.visit_order == current_director_number + 1: