Exemple #1
0
 void Start()
 {
     if (instatnce == null)
     {
         instatnce = this;
     }
     homeState.gameObjectsInThisState                  = gameObjectsInHomeState;
     selectLevelState.gameObjectsInThisState           = gameObjectsSelectLevelState;
     selectNumberOfPlayersState.gameObjectsInThisState = gameObjectsSelectNumberOfPlayersState;
     currentState = homeState;
     currentState.enterState();
 }
Exemple #2
0
 public void changeState(menuState newState)
 {
     currentState.exitState();
     newState.enterState();
     currentState = newState;
 }