- Introduced a new JobComponent and JobQueue to manage jobs in the game. - Created two new jobs: DigJob and InfectJob with their respective scripts. - Updated CrystalGlowComponent, FreeCameraComponent, MushroomGlowComponent, WaterEffectComponent to improve logging messages. - Adjusted camera movement limits in FreeCameraGameCameraComponent for better control. - Added FiniteStateMachine class for managing states of entities. - Implemented GlowingIdle state as an example of using the state machine. - Included a utility function to fetch file paths by extension from a directory.
20 lines
548 B
GDScript
20 lines
548 B
GDScript
extends Node2D
|
|
class_name MushroomGlow
|
|
|
|
@onready var inner_glow : PointLight2D = $InnerGlow
|
|
@onready var outer_glow : PointLight2D = $OuterGlow
|
|
@onready var animation : AnimationPlayer = $GlowAnimation
|
|
|
|
@export var colour_name : String = "blue"
|
|
|
|
func _ready() -> void:
|
|
set_light_colour(colour_name)
|
|
animation.play("GlowFlicker")
|
|
|
|
func set_light_colour(colour : String) -> void:
|
|
if colour == "blue":
|
|
inner_glow.color = "4cc5fa"
|
|
outer_glow.color = "00b4ff"
|
|
elif colour == "yellow":
|
|
inner_glow.color = "ffcf3c"
|
|
outer_glow.color = "ffcf3c"
|