ft (Wip): FSM behaviour prey

This commit is contained in:
2026-01-23 10:48:14 +01:00
parent 0b9b1e75d4
commit c11afd9ddd
24 changed files with 154 additions and 54 deletions

View File

@@ -0,0 +1,24 @@
class_name State extends Node
# Emits on state completion
signal finished(next_state_path: String, data: Dictionary)
# Called by StateMachine on unhandled input
func handle_input(_event: InputEvent) -> void:
pass
# Main update loop
func update(_delta: float) -> void:
pass
# Physics update loop
func physics_update(_delta: float) -> void:
pass
# Called by StateMachine on state change. Data contains arbitrary data to initialize state.
func enter(previous_state_path: String, data := {}) -> void:
pass
# Called by StateMachine before state change. Should be used for cleanup.
func exit() -> void:
pass