예제 #1
0
 public void EndLevelAnimationComplete()
 {
     if (LevelUnlockManager.SharedInstance().IsGameComplete() && LevelUnlockManager.SharedInstance().GetLevelSceneNameAfter(SceneManager.GetActiveScene().name) == null)
     {
         Object.FindObjectOfType <UIController>().GameComplete();
     }
     else
     {
         SceneManager.LoadScene(LevelUnlockManager.SharedInstance().GetLevelSceneNameAfter(SceneManager.GetActiveScene().name));             // "LevelSelect");
     }
 }
예제 #2
0
    void Start()
    {
        selectionsLocked = false;

        if (LevelUnlockManager.SharedInstance().IsLevelUnlocked(loadLevelString))
        {
            Unlock();
        }
        else
        {
            Lock();
        }
    }
예제 #3
0
    public void LevelComplete()
    {
        LevelUnlockManager.SharedInstance().LevelCompleted(SceneManager.GetActiveScene().name);
        Object.FindObjectOfType <PlayerCameraController>().LevelComplete(EndLevelAnimationComplete);

        // If player hasn't won the game, fade out the level
        if (!(LevelUnlockManager.SharedInstance().IsGameComplete() && LevelUnlockManager.SharedInstance().GetLevelSceneNameAfter(SceneManager.GetActiveScene().name) == null))
        {
            Object.FindObjectOfType <ScreenFlash> ().LevelCompleteFadeOut();
        }
        else
        {
            // Make player invincible if they've won
            Object.FindObjectOfType <PlayerDamageTaker> ().GameComplete();
//			Object.FindObjectOfType<PlayerHealth> ().enabled = false;
        }
    }