Exemplo n.º 1
0
    void turnOnValuablesShop()
    {
        ColorsButton.GetComponent <Image>().color     = Color.white;
        ShapesButton.GetComponent <Image>().color     = Color.white;
        PathColorsButton.GetComponent <Image>().color = Color.white;
        ThemesButton.GetComponent <Image>().color     = Color.white;
        MusicButton.GetComponent <Image>().color      = Color.white;
        MoneyButton.GetComponent <Image>().color      = Color.gray;

        PlayerColorText.GetComponent <Text>().color = Color.black;
        PlayerShapeText.GetComponent <Text>().color = Color.black;
        PathColorText.GetComponent <Text>().color   = Color.black;
        ThemeText.GetComponent <Text>().color       = Color.black;
        MusicText.GetComponent <Text>().color       = Color.black;
        MoneyText.GetComponent <Text>().color       = Color.white;

        PlayerColorShop.SetActive(false);
        PlayerShapeShop.SetActive(false);
        PathColorShop.SetActive(false);
        ThemeShop.SetActive(false);
        TrailShop.SetActive(false);
        ValuablesShop.SetActive(true);
    }
Exemplo n.º 2
0
    void turnOnPathColorShop()
    {
        ColorsButton.GetComponent <Image>().color     = Color.white;
        ShapesButton.GetComponent <Image>().color     = Color.white;
        PathColorsButton.GetComponent <Image>().color = Color.gray;
        ThemesButton.GetComponent <Image>().color     = Color.white;
        MusicButton.GetComponent <Image>().color      = Color.white;
        MoneyButton.GetComponent <Image>().color      = Color.green;

        PlayerColorText.GetComponent <Text>().color = Color.black;
        PlayerShapeText.GetComponent <Text>().color = Color.black;
        PathColorText.GetComponent <Text>().color   = Color.white;
        ThemeText.GetComponent <Text>().color       = Color.black;
        MusicText.GetComponent <Text>().color       = Color.black;
        MoneyText.GetComponent <Text>().color       = Color.white;


        PlayerColorShop.SetActive(false);
        PlayerShapeShop.SetActive(false);
        PathColorShop.SetActive(true);
        ThemeShop.SetActive(false);
        TrailShop.SetActive(false);
        ValuablesShop.SetActive(false);



        //for default
        if (PlayerPrefs.GetInt("PathColorOnce") == 0)
        {
            buyPathColorItem(0, "RedPath");
            PlayerPrefs.SetInt("PathColorOnce", 1);
        }

        //if bought then keep transparent colors default if bought
        if (PlayerPrefs.GetInt("RedPath", 0) == 1)
        {
            GameObject.Find("RedPathCost").GetComponent <Text>().text = "Red";
        }
        if (PlayerPrefs.GetInt("BluePath", 0) == 1)
        {
            GameObject.Find("BluePathCost").GetComponent <Text>().text = "Blue";
        }
        if (PlayerPrefs.GetInt("YellowPath", 0) == 1)
        {
            GameObject.Find("YellowPathCost").GetComponent <Text>().text = "Yellow";
        }
        if (PlayerPrefs.GetInt("OrangePath", 0) == 1)
        {
            GameObject.Find("OrangePathCost").GetComponent <Text>().text = "Orange";
        }
        if (PlayerPrefs.GetInt("GreenPath", 0) == 1)
        {
            GameObject.Find("GreenPathCost").GetComponent <Text>().text = "Green";
        }
        if (PlayerPrefs.GetInt("PurplePath", 0) == 1)
        {
            GameObject.Find("PurplePathCost").GetComponent <Text>().text = "Purple";
        }
        if (PlayerPrefs.GetInt("PinkPath", 0) == 1)
        {
            GameObject.Find("PinkPathCost").GetComponent <Text>().text = "Pink";
        }
        if (PlayerPrefs.GetInt("WhitePath", 0) == 1)
        {
            GameObject.Find("WhitePathCost").GetComponent <Text>().text = "White";
        }

        GameObject.Find(PlayerPrefs.GetString("WhichPathColorSelected") + "Cost").GetComponent <Text>().text = "Selected"; //selected on start
    }
Exemplo n.º 3
0
    void turnOnPlayerShapeShop()
    {
        ColorsButton.GetComponent <Image>().color     = Color.white;
        ShapesButton.GetComponent <Image>().color     = Color.gray;
        PathColorsButton.GetComponent <Image>().color = Color.white;
        ThemesButton.GetComponent <Image>().color     = Color.white;
        MusicButton.GetComponent <Image>().color      = Color.white;
        MoneyButton.GetComponent <Image>().color      = Color.green;

        PlayerColorText.GetComponent <Text>().color = Color.black;
        PlayerShapeText.GetComponent <Text>().color = Color.white;
        PathColorText.GetComponent <Text>().color   = Color.black;
        ThemeText.GetComponent <Text>().color       = Color.black;
        MusicText.GetComponent <Text>().color       = Color.black;
        MoneyText.GetComponent <Text>().color       = Color.white;


        PlayerColorShop.SetActive(false);
        PlayerShapeShop.SetActive(true);
        PathColorShop.SetActive(false);
        ThemeShop.SetActive(false);
        TrailShop.SetActive(false);
        ValuablesShop.SetActive(false);



        if (PlayerPrefs.GetInt("PlayerShapeOnce") == 0)
        {
            buyPlayerShapeItem(0, "Cube");
            PlayerPrefs.SetInt("PlayerShapeOnce", 1);
        }

        if (PlayerPrefs.GetInt("CubeShape", 0) == 1)
        {
            GameObject.Find("CubeCost").GetComponent <Text>().text = "Cube";
        }
        if (PlayerPrefs.GetInt("SphereShape", 0) == 1)
        {
            GameObject.Find("SphereCost").GetComponent <Text>().text = "Sphere";
        }
        if (PlayerPrefs.GetInt("BirdShape", 0) == 1)
        {
            GameObject.Find("BirdCost").GetComponent <Text>().text = "Bird";
        }
        if (PlayerPrefs.GetInt("TurtleShape", 0) == 1)
        {
            GameObject.Find("TurtleCost").GetComponent <Text>().text = "Turtle";
        }
        if (PlayerPrefs.GetInt("PlaneShape", 0) == 1)
        {
            GameObject.Find("PlaneCost").GetComponent <Text>().text = "Fish";
        }
        if (PlayerPrefs.GetInt("XShape", 0) == 1)
        {
            GameObject.Find("XCost").GetComponent <Text>().text = "Butterfly";
        }
        if (PlayerPrefs.GetInt("HeadShape", 0) == 1)
        {
            GameObject.Find("HeadCost").GetComponent <Text>().text = "Squirrel";
        }
        if (PlayerPrefs.GetInt("BatmanShape", 0) == 1)
        {
            GameObject.Find("BatmanCost").GetComponent <Text>().text = "Cylinder";
        }

        GameObject.Find(PlayerPrefs.GetString("WhichPlayerShapeSelected") + "Cost").GetComponent <Text>().text = "Selected"; //selected on start
    }
Exemplo n.º 4
0
    void turnOnThemeShop()
    {
        ColorsButton.GetComponent <Image>().color     = Color.white;
        ShapesButton.GetComponent <Image>().color     = Color.white;
        PathColorsButton.GetComponent <Image>().color = Color.white;
        ThemesButton.GetComponent <Image>().color     = Color.gray;
        MusicButton.GetComponent <Image>().color      = Color.white;
        MoneyButton.GetComponent <Image>().color      = Color.green;

        PlayerColorText.GetComponent <Text>().color = Color.black;
        PlayerShapeText.GetComponent <Text>().color = Color.black;
        PathColorText.GetComponent <Text>().color   = Color.black;
        ThemeText.GetComponent <Text>().color       = Color.white;
        MusicText.GetComponent <Text>().color       = Color.black;
        MoneyText.GetComponent <Text>().color       = Color.white;


        PlayerColorShop.SetActive(false);
        PlayerShapeShop.SetActive(false);
        PathColorShop.SetActive(false);
        ThemeShop.SetActive(true);
        TrailShop.SetActive(false);
        ValuablesShop.SetActive(false);



        //for default
        if (PlayerPrefs.GetInt("ThemeOnce") == 0)
        {
            buyThemeItem(0, "WhiteBlackColor");
            PlayerPrefs.SetInt("ThemeOnce", 1);
        }

        //if bought then keep transparent colors default if bought
        if (PlayerPrefs.GetInt("WhiteBlackColor", 0) == 1)
        {
            GameObject.Find("WhiteBlackColorCost").GetComponent <Text>().text = "Normal";
        }
        if (PlayerPrefs.GetInt("BlackWhiteColor", 0) == 1)
        {
            GameObject.Find("BlackWhiteColorCost").GetComponent <Text>().text = "Inverted";
        }
        if (PlayerPrefs.GetInt("BlueYellowColor", 0) == 1)
        {
            GameObject.Find("BlueYellowColorCost").GetComponent <Text>().text = "Yankee";
        }
        if (PlayerPrefs.GetInt("GreenRedColor", 0) == 1)
        {
            GameObject.Find("GreenRedColorCost").GetComponent <Text>().text = "Holidays";
        }
        if (PlayerPrefs.GetInt("PinkPurpleColor", 0) == 1)
        {
            GameObject.Find("PinkPurpleColorCost").GetComponent <Text>().text = "Pink";
        }
        if (PlayerPrefs.GetInt("GreenGreenColor", 0) == 1)
        {
            GameObject.Find("GreenGreenColorCost").GetComponent <Text>().text = "Forest";
        }
        if (PlayerPrefs.GetInt("YellowYellowColor", 0) == 1)
        {
            GameObject.Find("YellowYellowColorCost").GetComponent <Text>().text = "Sandy";
        }
        if (PlayerPrefs.GetInt("OrangeRedColor", 0) == 1)
        {
            GameObject.Find("OrangeRedColorCost").GetComponent <Text>().text = "Sunny";
        }

        GameObject.Find(PlayerPrefs.GetString("WhichThemeSelected") + "Cost").GetComponent <Text>().text = "Selected"; //selected on start
    }