godot-plateformer/_player/states/idle.gd

9 lines
229 B
GDScript3
Raw Permalink Normal View History

2025-12-29 11:54:31 +08:00
extends LimboState
func _enter() -> void:
2026-01-05 17:38:43 +08:00
agent.locomotion_comp.stop_movement(0.0) #用0唤起制动加速度
2025-12-29 11:54:31 +08:00
func _update(delta: float) -> void:
2025-12-30 10:15:32 +08:00
if agent.get_move_input().x != 0.0:
2025-12-29 11:54:31 +08:00
get_root().dispatch(self.EVENT_FINISHED)