// 0 Memory 1 Tischdecken public void AddPoints(int EP, int ID) { if (ID == 1) { ep *= 2; } if (firstWinOfDayCheck(ID)) { ep += EP * 2; time[ID] = System.DateTime.Now; } else { ep += EP; } if (Levelübergang.brokeHighscore(EP, ID)) { IDtemp = ID; eptemp = EP; SceneManager.LoadScene("nameenter"); } else { SceneManager.LoadScene("Levelauswahl"); } Levelübergang.lvlCheck(); }
void Awake() { if (gameManager == null) { DontDestroyOnLoad(gameObject); gameManager = this; highscore[0] = new int[5]; highscore[1] = new int[5]; highscoreName[0] = new string[5]; highscoreName[1] = new string[5]; Levelübergang.Load(); } else if (gameManager != this) { Destroy(gameObject); } }