Beispiel #1
0
 public void addUB()
 {
     UB++;
     PlayerPrefs.SetInt("UB", PlayerPrefs.GetInt("UB") + 1);
     textUB.text    = UB.ToString();
     imageUB.sprite = fUB;
 }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        HB = PlayerPrefs.GetInt("HB");
        SB = PlayerPrefs.GetInt("SB");
        UB = PlayerPrefs.GetInt("UB");

        if (HB > 0)
        {
            imageHB.sprite = fHB;
        }

        if (SB > 0)
        {
            imageSB.sprite = fSB;
        }

        if (UB > 0)
        {
            imageUB.sprite = fUB;
        }

        textHB.text = HB.ToString();
        textSB.text = SB.ToString();
        textUB.text = UB.ToString();
    }
Beispiel #3
0
    public void useUB()
    {
        if (UB > 0)
        {
            player.addUnhitEffect();
            UB -= 1;
            PlayerPrefs.SetInt("UB", PlayerPrefs.GetInt("UB") - 1);
        }

        textUB.text = UB.ToString();

        if (UB == 0)
        {
            imageUB.sprite = eUB;
        }
    }