Skip to content

Finite state machine (State&Command patterns implementation) in GDScript with separate classes representing actions

Notifications You must be signed in to change notification settings

tischenkob/finite-state-machine

Repository files navigation

finite-state-machine

Finite state machine (State&Command patterns implementation) in GDScript with separate classes representing actions

Includes three abstract classes: StateMachine, State, Action

Adding a new character mechanic is as simple as:

  1. dropping an Action child-node in a State node in a StateMachine node
  2. overriding _update(delta) or _handle_input(event)

Character
--StateMachine
----State1
------Action1
------Action2
----State2
------Action1
------Action3

About

Finite state machine (State&Command patterns implementation) in GDScript with separate classes representing actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published