void QueueGameOver(ScreenSide side, int points) { //Object.Instantiate(Resources.Load("GameOverMessage")); GameOverMessage instance = Instantiate(Resources.Load("GameOverMessage", typeof(GameOverMessage))) as GameOverMessage; instance.SetWinner(side); AudioManager.Play(AudioClipName.GameOver); }
/// <summary> /// Ends the game and displays the winner message /// </summary> /// <param name="winner">winning side</param> public void EndGame(ScreenSide winner) { // instantiate prefab and set score GameObject gameOverMessage = Instantiate(Resources.Load("GameOverMessage")) as GameObject; GameOverMessage gameOverMessageScript = gameOverMessage.GetComponent <GameOverMessage>(); gameOverMessageScript.SetWinner(winner); }
void Gameover(ScreenSide side) { GameObject instance = Instantiate(Resources.Load("gameovermenu")) as GameObject; GameOverMessage game = instance.GetComponent <GameOverMessage>(); game.SetWinner(side); AudioManager.Play(AudioClipName.GameOver); }