Example #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();
    }
Example #2
0
 private void ProgressUnlock()
 {
     GameSave.CompleteGame(Game.instance.levelCount);
     Shell.Print("progress unlocked");
 }