示例#1
0
 public void ResetGame(bool unloadSong)
 {
     UnpauseGame();
     DeleteGameObjects();
     playAreaScript.ResetPlatforms();
     inGame = false;
     hiscoretable.SetActive(false);
     highTempo            = false;
     currentTempoIncrease = 0;
     starPower.SetActive(false);
     starPowerTime = 0;
     songTime      = 0;
     beatNumber    = 0;
     level         = 1;
     songStopped   = true;
     GameObject.Find("Ready").GetComponent <TextReady>().Reset();
     cameraManager.Reset();
     Camera.main.GetComponent <RotateAround>().enabled = true;
     backGroundRays.transform.eulerAngles = new Vector3(-90, 0, 0);
     backGroundRays.SetActive(false);
     scoringSystem.GetComponent <ScoringSystem>().ResetScore();
     playerScript.Reset();
     playerScript.StarPowerOff();
     if (unloadSong)
     {
         _songData.UnloadTracks();
     }
     _songData = null;
     SetScripts(false);
 }