public void KillPlayer()
 {
     if (!playing)
     {
         return;
     }
     if (currentScore > highestScore)
     {
         highestScore = (int)currentScore;
         PlayerPrefs.SetInt("HighScore", highestScore);
     }
     GUIManagement.CloseAll();
     playerCube.isKinematic     = true;
     playerCube.velocity        = Vector2.zero;
     playerCube.angularVelocity = 0;
     playing             = false;
     deathKiller.enabled = true;
 }
예제 #2
0
 public void LoadScene()
 {
     GUIManagement.CloseAll();
     SceneManager.LoadScene("Main", LoadSceneMode.Single);
 }