19 lines
452 B
GDScript
19 lines
452 B
GDScript
extends ChatterState
|
|
class_name BornState
|
|
|
|
func _enter() -> void:
|
|
while not chatter.visual:
|
|
await get_tree().process_frame
|
|
print("We have visual")
|
|
chatter.is_gravity_disabled = true
|
|
chatter.visual.play(&"born")
|
|
await chatter.visual.animation_finished
|
|
print("Animation Finished")
|
|
chatter.is_gravity_disabled = false
|
|
|
|
func _exit() -> void:
|
|
pass
|
|
|
|
func _update(_delta: float) -> void:
|
|
if chatter.is_on_floor():
|
|
transitioned.emit(self, "idle")
|