예제 #1
0
    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);
    }
예제 #2
0
    /// <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);
    }
예제 #3
0
    void Gameover(ScreenSide side)
    {
        GameObject      instance = Instantiate(Resources.Load("gameovermenu")) as GameObject;
        GameOverMessage game     = instance.GetComponent <GameOverMessage>();

        game.SetWinner(side);
        AudioManager.Play(AudioClipName.GameOver);
    }