Esempio n. 1
0
    public IEnumerator PassLevel()
    {
        currentLevel.CompleteLevel();
        if (NetGame.isLocal)
        {
            GameSave.PassCheckpointCampaign((uint)currentLevelNumber, 0, 0);
        }
        if (GameIsCompleted())
        {
            if (singleRun)
            {
                StatsAndAchievements.UnlockAchievement(Achievement.ACH_SINGLE_RUN);
            }
            if (NetGame.isLocal)
            {
                GameSave.CompleteGame(levelCount);
            }
            yield return(null);

            App.instance.StartNextLevel((uint)levelCount, 0);
        }
        else
        {
            int nextLevel = GetNextLevel(currentLevelNumber);
            if (NetGame.isLocal)
            {
                GameSave.PassCheckpointCampaign((uint)nextLevel, 0, 0);
            }
            yield return(null);

            App.instance.StartNextLevel((uint)nextLevel, 0);
        }
        StatsAndAchievements.Save();
    }
Esempio n. 2
0
    public void UnloadLevel()
    {
        StatsAndAchievements.Save();
        Resume();
        AfterUnload();
        MenuCameraEffects menuCameraEffects = MenuCameraEffects.instance;

        if ((bool)menuCameraEffects)
        {
            menuCameraEffects.ForceDisableOcclusion(forceDisableOcclusion: false);
        }
    }