UnloadLevel() public méthode

public UnloadLevel ( string levelName ) : void
levelName string
Résultat void
Exemple #1
0
        public void StateChanged(Game game, GameState oldState, GameState newState)
        {
            switch (newState)
            {
            case GameState.Ready:
                Log.Info($"Game instance initialized... (Instance={game.InstanceName})");

                game.State = GameState.WaitingForPlayers;
                break;

            case GameState.WaitingForPlayers:
                Log.Info($"Game instance is waiting for players... (Instance={game.InstanceName})");
                break;

            case GameState.Starting:

                break;

            case GameState.InProgress:
                CheckInstances();
                break;

            case GameState.Finished:

                break;

            case GameState.Empty:
                if (TryRemoveInstance(game))
                {
                    LevelManager.UnloadLevel(game.Level);
                }
                CheckInstances();
                break;
            }
        }
Exemple #2
0
 void CmdBoot(string[] args)
 {
     clientFrontend.ShowMenu(ClientFrontend.MenuShowing.None);
     levelManager.UnloadLevel();
     ShutdownGameLoops();
     Console.s_PendingCommandsWaitForFrames = 1;
     Console.SetOpen(true);
 }
 private void LevelFinished(PortalType portalType)
 {
     currentStreak.value++;
     if (currentStreak.value > bestStreak.value)
     {
         bestStreak.value = currentStreak.value;
         bestStreakDisplay.Display();
         //TODO aca habria q tirar animacion de haber mejorado el best score
     }
     currentStreakDisplay.Display();
     EventManager.OnPlayerReceiveRewards();
     levelManager.UnloadLevel();
     levelManager.LoadLevel(portalType);
 }
    void ResetToHomeState()
    {
        levelManager.UnloadLevel(null);

        // reset this if set by the level
        ShowReticleOnClick(false);

        // restore state to main icon bar
        mainScene.ShowHome();

        // remove look down menu
        Destroy(lookDownMenu);
        lookDownMenu = null;

        ShowEnvironment(EnvironmentEnum.kNone);

        ResetCameraPositon();
    }
 void ExitPlatforming()
 {
     levelManager.UnloadLevel();
     Camera.GetComponent <PlayerFollower>().followingPlayer = false;
     Camera.transform.position = Camera.GetComponent <PlayerFollower>().startingPosition;
 }
Exemple #6
0
 public void GotoMenu()
 {
     gameOver.SetActive(false);
     MainMenu.instance.gameObject.SetActive(true);
     levelManager.UnloadLevel();
 }
Exemple #7
0
    void CmdBoot(string[] args)
    {
        levelManager.UnloadLevel();

        ShutdownGameLoops();
    }
Exemple #8
0
 public void UnloadLevel(string levelName) // calls the UnloadLevel method of the levelManager with the name of the level
 {
     levelManager.UnloadLevel(levelName);
 }