Bee flying animation, dancing drone
This commit is contained in:
parent
7c3bca07f9
commit
bce75a9a97
13 changed files with 154 additions and 21 deletions
|
|
@ -1,8 +1,6 @@
|
|||
extends State
|
||||
class_name BeeTravelling
|
||||
|
||||
@export var animator : AnimationPlayer
|
||||
|
||||
@export var target : Drone = null
|
||||
|
||||
@onready var bee = get_parent().get_parent() as Bee # I think this is bad but I dont care it works
|
||||
|
|
@ -12,13 +10,17 @@ var t = 0
|
|||
func enter(_msg := {}):
|
||||
Log.pr("I am on the move!")
|
||||
## Get the next target location from the bee
|
||||
target = bee.get_next_target()
|
||||
if bee.just_gathering:
|
||||
target = bee.get_current_director() # We want to go back the way we came
|
||||
bee.just_gathering = false
|
||||
else:
|
||||
target = bee.get_next_target()
|
||||
|
||||
#animator.play("Idle")
|
||||
bee.animation_player.play("Flying")
|
||||
|
||||
pass
|
||||
|
||||
func update(delta : float):
|
||||
func update(delta : float) -> void:
|
||||
|
||||
if target:
|
||||
if bee.position.distance_to(target.position) > 3:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue