Enums
Enums, also referred to as enumerations, are a data type that contains a fixed set of constants.
Global Enums
enum {LEFT, RIGHT, UP, DOWN}
# Same as writing
const LEFT = 0
const RIGHT = 1
const UP = 2
const DOWN = 3
Local Enums
enum MOVE_SET {LEFT, RIGHT, UP, DOWN}
MOVE_SET.LEFT # 0
MOVE_SET.RIGHT # 1
MOVE_SET.UP # 2
MOVE_SET.DOWN # 3
Resources
Github Project:
Godot Tutorials Resources