Ejemplo n.º 1
0
 // Once the game needs to restart to its normal values in order to play again
 void resetGame()
 {
     Tile1.SetActive(false);
     Tile2.SetActive(false);
     Tile3.SetActive(false);
     pickTileText.SetActive(false);
     moneyAddFlag = true;
 }
Ejemplo n.º 2
0
    public bool moneyAddFlag = true;                // Flag to disable Play 100 from doing anything



    // Start is called before the first frame update
    void Start()
    {
        // Restart the amount of credits to zero at the beginning of the game
        creditAmount = 0;
        //Restart the playButton back to show up
        playButton.SetActive(true);

        // Don't show pick a tile text yet
        pickTileText.SetActive(false);

        // Let all the tiles be unactive until we hit play
        Tile1.SetActive(false);
        Tile2.SetActive(false);
        Tile3.SetActive(false);
    }
Ejemplo n.º 3
0
    /*
     * Button -> Play100
     * GameObj -> addCreditsObj
     * Function -> This can only be played when Credits has 100 or more. When pressed, Credits will be reduced
     * by 100 and play beings.
     */
    public void onClickPlay()
    {
        // This can only be played when credits have 100 or more
        if (creditAmount >= 100 && moneyAddFlag)
        {
            // When pressed, credits will be reduced by 100
            creditAmount -= 100;
            // Display the current amount of credits
            creditText.text = "Credits: " + creditAmount.ToString();
            // TODO: Start playing the game
            Tile1.SetActive(true);
            Tile2.SetActive(true);
            Tile3.SetActive(true);

            tile1Value = 0;
            tile2Value = 0;
            Tile3Value = 0;

            assignValues();
        }
    }