/// <summary> /// Initalize the states and add them /// </summary> protected override void Start() { base.Start(); StateMachine = new CharacterStateMachine(this); falling = new Falling(); grounded = new Grounded(); motion = new Motion(); cutscene = new Cutscene(); // Add states StateMachine.AddState(StateName.Falling, falling); StateMachine.AddState(StateName.Grounded, grounded); StateMachine.AddState(StateName.Motion, motion); StateMachine.AddState(StateName.Cutscene, cutscene); }