Add RulesComponent, GameRulesResource, and BeeDeath state. Update Bee entity with death animation. Include new textures for particles. Add Highlight animation to Beehive.
This commit is contained in:
parent
1da411cacd
commit
d879ca30bd
222 changed files with 3980 additions and 149 deletions
|
|
@ -5,6 +5,8 @@ class_name Bee
|
|||
@onready var drone_manager = get_tree().get_first_node_in_group("dronemanager") as DroneManager
|
||||
@onready var bee_position_animation = $BeePositionAnimation as AnimationPlayer
|
||||
@onready var bee_wing_animation = $WingAnimation as AnimationPlayer
|
||||
@onready var bee_body = $BeeBody as Sprite2D
|
||||
@onready var impact_cloud : CPUParticles2D = $ImpactCloud
|
||||
|
||||
@export var nectar : int = 0
|
||||
@export var speed : int = 30
|
||||
|
|
@ -16,6 +18,8 @@ var in_range_of_flowers : bool = false
|
|||
var just_gathering : bool = false # Used to check if the bee has just been gathering to return to their previous director
|
||||
|
||||
func _ready():
|
||||
modulate = Color(1,1,1,1)
|
||||
impact_cloud.visible = false
|
||||
speed = randi_range(35,55) # Randomise the bee speed a bit
|
||||
bee_wing_animation.play("Fly")
|
||||
|
||||
|
|
@ -61,8 +65,7 @@ func deposit_nectar():
|
|||
|
||||
func die():
|
||||
# Move to the death state
|
||||
# For now just remove the bee...
|
||||
queue_free()
|
||||
fsm.force_change_state("Death")
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue