Exemple #1
0
    public void ustawpostac()
    {
        if (PlayerPrefs.GetInt("postac" + character_count) == character_count)
        {
            PlayerPrefs.SetInt("dziala", character_count);
            click.GetComponent <Image>().sprite = image_of_character;
            warning_object.GetComponent <Animator>().Play("textinfopost");
            warning_object.GetComponent <Image>().color = character_chosen;

            if (PlayerPrefs.GetInt("jezyk") == 0)
            {
                notification.text = "Character has been chosen";
            }
            else if (PlayerPrefs.GetInt("jezyk") == 1)
            {
                notification.text = "Ustawiono nową postać";
            }

            PlayerPrefs.SetFloat("reputacja123", reputation);
        }
        else
        {
            buy.gameObject.SetActive(true);
            setactive.gameObject.SetActive(false);
            padlock.gameObject.SetActive(false);
        }
    }
Exemple #2
0
    public void Clicked(Click obj)
    {
        try
        {
            obj.GetComponent <PlaySound>().Play("Click");
        }
        catch { }

        if (obj.GetComponent <Click>().type == "QuitGameBtn")
        {
            Application.Quit();
        }
        else
        {
            btn = obj;
            ButtonEvents[btn.type]();
        }
    }
Exemple #3
0
    public void ustawpostac()
    {
        if (PlayerPrefs.GetInt("postac100") == 100)
        {
            PlayerPrefs.SetInt("dziala", 100);
            click.GetComponent <Image>().sprite = adbuster;
            warning_object.GetComponent <Animator>().Play("textinfopost");
            warning_object.GetComponent <Image>().color = character_chosen;

            if (PlayerPrefs.GetInt("jezyk") == 0)
            {
                notification.text = "Character has been chosen";
            }
            else if (PlayerPrefs.GetInt("jezyk") == 1)
            {
                notification.text = "Ustawiono nową postać";
            }
            PlayerPrefs.SetFloat("reputacja123", 95);
            //reputacjatext.text = "" + Mathf.Round(100 - reputacja) + "% reputacji";
        }
        if (PlayerPrefs.GetInt("postac101") == 101)
        {
            PlayerPrefs.SetInt("dziala", 101);
            click.GetComponent <Image>().sprite = magiay;
            warning_object.GetComponent <Animator>().Play("textinfopost");
            warning_object.GetComponent <Image>().color = character_chosen;

            if (PlayerPrefs.GetInt("jezyk") == 0)
            {
                notification.text = "Character has been chosen";
            }
            else if (PlayerPrefs.GetInt("jezyk") == 1)
            {
                notification.text = "Ustawiono nową postać";
            }
            PlayerPrefs.SetFloat("reputacja123", 95);
            //reputacjatext.text = "" + Mathf.Round(100 - reputacja) + "% reputacji";
        }
    }