public void mainMenu() { Time.timeScale = 1.0f; sound.setMusicInstruments(-1f); sound.stopRainSound(); SceneManager.LoadScene(0); }
public void killPlayer() { sound.stopRainSound(); move.toggleMovement(); if (playDeath) { sound.playDeat(); playDeath = false; } sound.setMusicInstruments(-1f); // GameObject deathBrick = Instantiate(death); // Here is bug GameObject instance = Instantiate(Resources.Load("PlayerDeath", typeof(GameObject))) as GameObject; //deathBrick.transform.position = gameObject.transform.position; instance.transform.position = gameObject.transform.position; StartCoroutine(waitToKill(death)); StartCoroutine(waitGameOver()); }
public void startGame() { sound.stopMenuMusic(); sound.stopRainSound(); SceneManager.LoadScene(1); }