public IState CreateStateByID(AState.EGameState newStateID) { switch (newStateID) { case AState.EGameState.MENU: StartState loginS = AFObject.Create <StartState>(); loginS.SetStateID(AState.EGameState.MENU); return(loginS); } return(null); }