I'm trying to get all my ducks in a row for my animations and stuff. Am I correct to put all of my animation groups in states like this? Have all the types, and then the individual animations within each one?


And then in code, I have everything sorted as enums.
extends KinematicBody
### CHECK THE MODE OF TRANSPORTATION ###
enum {
WALK,
SNEAK,
RIDE,
SWIM,
DIVE
}
var move_state = WALK
## DEFAULT MOVEMENT SPEEDS ETC. ###
export var speed = 5
export var speed_rotation : float = 50
export var fall_acceleration = 0
var velocity = Vector3.ZERO
var isSeeing = false
### GET THE ANIMATIONS ###
onready var animationPlayer = $AnimationPlayer
onready var animationTree = $AnimationTree
onready var animationState = animationTree.get("parameters/playback")
func _ready():
animationTree.set_active(true)
### MAKE IT ALL WORK SOMEHOW ###
func _process(delta):
match move_state:
WALK:
walk_state(delta)
SNEAK:
sneak_state(delta)
RIDE:
horse_state(delta)
SWIM:
swim_state(delta)
DIVE:
dive_state(delta)
theSight()
func walk_state(delta):
pass
func sneak_state(delta):
pass
func horse_state(delta):
pass
func swim_state(delta):
pass
func dive_state(delta):
pass
Am I on the right track at least?