private void endBossLevel() { TimeTracker.stopTime(); TimeTracker.saveFinalTime(); PlayerPrefs.SetInt("score", ScoreTracker.getScore()); PlayerPrefs.SetInt("lives", LifeTracker.getLives()); PlayerPrefs.SetString("NextLevel", "End"); SceneManager.LoadScene("LevelComplete"); }
void OnTriggerEnter2D(Collider2D other) { if (other.GetComponent <Player> () == null) { return; } TimeTracker.stopTime(); TimeTracker.saveFinalTime(); PlayerPrefs.SetInt("score", ScoreTracker.getScore()); PlayerPrefs.SetInt("lives", LifeTracker.getLives()); PlayerPrefs.SetInt("Level2Unlocked", 1); PlayerPrefs.SetString("NextLevel", "Level 2"); SceneManager.LoadScene("LevelComplete"); }