ft (Wip): FSM behaviour prey
This commit is contained in:
1 parent
0b9b1e75d4
commit
c11afd9ddd
24 files changed
+154
-54
No files matched your search
@@ -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
|
||||