Skip to content

Instantly share code, notes, and snippets.

View meloonics's full-sized avatar
🐭
My centropy

meloonics

🐭
My centropy
View GitHub Profile
@NovemberDev
NovemberDev / godot_finite_state_machine.gd
Last active October 5, 2021 12:09
Godot Finite state machine script / class in one file
# godot_finite_state_machine.gd
# by: @november_dev
#
# The finite state machine takes in a number of states and transitions.
#
# A state can contain a function that will be executed or looped while the state is active.
#
# The transition gets a function that returns a boolean truthiness value, which determines
# if the transition should happen or not.
#