void NewGame() { // StartCoroutine(pauseGame()); sc.ResetScore(); tm.resetTimer(); bm.Spawn(); }
public void gameOver(int winningPlayer, int winningPlayerScore, string winningPlayerName, int losingPlayer, int losingPlayerScore, string losingPlayerName) { // winScreen.text = "Congrats " + winningPlayerName + "! You won with " + winningPlayer + " points! /n Don't Worry " + losingPlayer + " you'll get them next time!"; winUi.sprite = winner[winningPlayer]; gameOverPause = true; sc.ResetScore(); tm.StartTimer(); bm.Spawn(); winScreen.text = ""; }
IEnumerator Respawn(BallMovement mov) { yield return(new WaitForSeconds(respawnTime)); mov.Spawn(spawnPoints[(++lastSpawn) % 4].position); }