Lots of colouring in

This commit is contained in:
Dan 2024-05-08 14:03:38 +01:00
parent 02f4ae939c
commit 1c33ea2f59
24 changed files with 592 additions and 46 deletions

View file

@ -8,6 +8,8 @@ var time_at_patch : float = 0.0
func enter(_msg := {}):
bee.just_gathering = true
Log.pr("Gathering now...")
#animator.play("Idle")
#if !bee.in_range_of_flowers:
@ -22,6 +24,7 @@ func update(_delta : float):
#animator.play("Gathering")
time_at_patch += _delta
if time_at_patch > 5.0:
Log.pr("Gathered nectar!")
bee.nectar += 1
state_transition.emit(self, "Idle")
else:

View file

@ -20,6 +20,7 @@ func update(delta : float):
func find_something_to_do():
if bee.nectar > 0:
Log.pr("I have pollen, time to move..")
## Bee has pollen - head home
state_transition.emit(self, "Travelling")
else:

View file

@ -5,6 +5,7 @@ class_name BeeReturning
@onready var target = get_tree().get_first_node_in_group("beehive")
func enter(_msg := {}):
Log.pr("Returning to the hive")
bee.animation_player.play("Flying")
func update(delta : float) -> void:

View file

@ -12,6 +12,10 @@ func enter(_msg := {}):
## Get the next target location from the bee
if bee.just_gathering:
target = bee.get_current_director() # We want to go back the way we came
if !target:
Log.pr("No director around, returning to hive")
## If there is no other director, just go straight back home
state_transition.emit(self, "Returning")
bee.just_gathering = false
else:
target = bee.get_next_target()