예제 #1
0
    public void GoToShop(int number)
    {
        switch (number)
        {
        case 0:
            colour = COLOURS.BLUE;
            break;

        case 1:
            colour = COLOURS.YELLOW;
            break;

        case 2:
            colour = COLOURS.RED;
            break;

        case 3:
            colour = COLOURS.ORANGE;
            break;

        case 4:
            colour = COLOURS.GREEN;
            break;
        }
        menu.SetActive(true);
    }
예제 #2
0
 public void SetOrangeBall()
 {
     if (PlayerPrefs.GetInt("OrangeBalls") > 0)
     {
         colour = COLOURS.ORANGE;
         starButtonOrange.transform.GetChild(0).GetComponent <Image>().enabled   = true;
         starButtonGreen.transform.GetChild(0).GetComponent <Image>().enabled    = false;
         starButtonYellow.transform.GetChild(0).GetComponent <Image>().enabled   = false;
         starButtonBlue.transform.GetChild(0).GetComponent <Image>().enabled     = false;
         starButtonRed.transform.GetChild(0).GetComponent <Image>().enabled      = false;
         starButtonStandard.transform.GetChild(0).GetComponent <Image>().enabled = false;
     }
 }
    //Returns the colour data and whether it is free or not.
    public ColourData GetColour(COLOURS a_colours)
    {
        ColourData r_colours = new ColourData();
        r_colours.isFree = !array[(int)a_colours];

        //Checks whether the colour is free
        if (r_colours.isFree == true)
        {
            r_colours.colour = colours[a_colours];
            array[(int)a_colours] = true;
            r_colours.playerID = (int)a_colours;
        }
        else
        {
            r_colours.colour = white;
            r_colours.playerID = 10;
        }

        return r_colours;
    }
 //Free's the colour for other use [cam]
 public void FreeColour(COLOURS a_colours)
 {
     //Set the colour to be available [cam]
     array[(int)a_colours] = false;
 }