34 lines
632 B
GDScript
34 lines
632 B
GDScript
class_name BaseState
|
|
extends Node
|
|
|
|
@export var state_machine: PlayerStateMachine
|
|
|
|
func GetStateEnum() -> PlayerStateMachine.States:
|
|
push_error("Unimplemented Method: BaseState.GetName")
|
|
return PlayerStateMachine.States.IDLE
|
|
|
|
|
|
func GetAnimationBaseName() -> String:
|
|
var state: String = PlayerStateMachine.States.keys()[GetStateEnum()]
|
|
return state.to_lower()
|
|
|
|
|
|
func Enter(_extra_parameters: Dictionary) -> void:
|
|
pass
|
|
|
|
|
|
func Exit() -> void:
|
|
pass
|
|
|
|
|
|
func Update(_delta: float) -> void:
|
|
pass
|
|
|
|
|
|
func IsActive() -> bool:
|
|
return state_machine.GetCurrentStateEnum() == GetStateEnum()
|
|
|
|
|
|
func IsStateActionable() -> bool:
|
|
return true
|