who the fuck knows

This commit is contained in:
Dan 2024-05-08 17:06:15 +01:00
parent 1c33ea2f59
commit 1da411cacd
31 changed files with 1372 additions and 78 deletions

View file

@ -3,7 +3,8 @@ class_name Bee
@onready var fsm = $StateMachine as FiniteStateMachine
@onready var drone_manager = get_tree().get_first_node_in_group("dronemanager") as DroneManager
@onready var animation_player = $AnimationPlayer as AnimationPlayer
@onready var bee_position_animation = $BeePositionAnimation as AnimationPlayer
@onready var bee_wing_animation = $WingAnimation as AnimationPlayer
@export var nectar : int = 0
@export var speed : int = 30
@ -16,6 +17,7 @@ var just_gathering : bool = false # Used to check if the bee has just been gathe
func _ready():
speed = randi_range(35,55) # Randomise the bee speed a bit
bee_wing_animation.play("Fly")
func get_current_director():
return drone_manager.get_director(latest_target_director)
@ -51,10 +53,11 @@ func get_next_target():
return null
func deposit_nectar():
GameState.add_nectar()
nectar = 0
latest_target_director = 0
just_gathering = false
if nectar > 0:
GameState.add_nectar()
nectar = 0
latest_target_director = 0
just_gathering = false
func die():
# Move to the death state