public static GlobalOgreState GetInstance() { if (instance == null) { instance = new GlobalOgreState(); } return(instance); }
// Initialize state in Start (Called after all objects are Awake) private void Start() { stateMachine.SetGlobalState(GlobalOgreState.GetInstance()); stateMachine.ChangeState(GoToNewRegionOgreState.GetInstance()); }