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