private static StateMachine <GameManager> Register() { if (StateMachineInstance != null) { Debug.Log(StateMachineInstance); } StateMachine <GameManager> stateMachine = new StateMachine <GameManager>(); stateMachine.DefineInitialState(States_InGame.Active); stateMachine.DefineTransition( fromState: States_InGame.Active, toState: States_InGame.Paused ); stateMachine.DefineTransition( fromState: States_InGame.Paused, toState: States_InGame.Active ); return(stateMachine); }