Exemplo n.º 1
0
    private void ShowBigWinTest()
    {
        GuiSeparator("Big Win");
        string buttonText = "";

        if (BigWin.bigWinActive)
        {
            buttonText = "Stop Big Win effects";
        }
        else
        {
            buttonText = "Play Big Win effects";
        }
        if (GUILayout.Button(buttonText))
        {
            BigWin.bigWinActive = !BigWin.bigWinActive;
            BigWin.ActivateBigWin(BigWin.bigWinActive);
        }
        string cannonText = "";

        if (BigWin.coinCannonActive)
        {
            cannonText = "Stop coin cannons";
        }
        else
        {
            cannonText = "Play coin cannons";
        }
        if (GUILayout.Button(cannonText))
        {
            BigWin.coinCannonActive = !BigWin.coinCannonActive;
            BigWin.ActivateCoins(BigWin.coinCannonActive);
        }
    }
Exemplo n.º 2
0
 private void NewGame()
 {
     GetComponent <Canvas>().enabled = false;
     BigWin.ActivateCoins(false);
     BigWin.ActivateBigWin(false);
     gameIsOver = false;
 }
Exemplo n.º 3
0
    public void ActivateGameOver(int playerThatWon)
    {
        gameIsOver = true;
        GetComponent <Canvas>().enabled = true;
        winningPlayer = playerThatWon;

        // draw
        if (playerThatWon == -1)
        {
            transform.GetChild(1).GetComponent <Image>().enabled = true;
            transform.GetChild(2).GetComponent <Text>().enabled  = true;
        }
        else
        {
            BigWin.ActivateBigWin(true);
            BigWin.ActivateCoins(true);
        }
        if (onGameOver != null)
        {
            onGameOver();
        }
    }