예제 #1
0
 public void Restart()
 {
     LevelScrollingManager.Instance().Restart();
     WorldGenerator.Instance().GenerateStart();
     ScoreSystem.Instance().Restart();
     pc.Respawn();
     audioSource.PlayOneShot(endGameSound, 0.4f);
     EndGame();
 }
예제 #2
0
 private void Awake()
 {
     // Singleton.
     if (instance != null && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         instance = this;
     }
 }