ft (Wip): FSM behaviour prey
This commit is contained in:
24
evolve-die-repeat/shared/state.gd
Normal file
24
evolve-die-repeat/shared/state.gd
Normal 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
|
||||
Reference in New Issue
Block a user