예제 #1
0
    public void OnClick_RedeemGift()
    {
        theSoundScript.PlaySelectSound();
        switch (GiftID)
        {
        case 50:
            PlayerPrefs.SetInt("Coins", PlayerPrefs.GetInt("Coins") + GiftID);
            break;

        case 300:
            PlayerPrefs.SetInt("Coins", PlayerPrefs.GetInt("Coins") + GiftID);
            break;

        case 500:
            PlayerPrefs.SetInt("Coins", PlayerPrefs.GetInt("Coins") + GiftID);
            break;

        case 1000:
            PlayerPrefs.SetInt("Coins", PlayerPrefs.GetInt("Coins") + GiftID);
            break;

        case 1:
            AvatarDatabase.EyesLocked[4] = false;
            break;

        case 2:
            AvatarDatabase.EyesLocked[5] = false;
            break;

        case 3:
            AvatarDatabase.EyesLocked[6] = false;
            break;

        case 4:
            AvatarDatabase.NoseLocked[5] = false;
            break;

        case 5:
            AvatarDatabase.NoseLocked[7] = false;
            break;

        case 6:
            AvatarDatabase.NoseLocked[9] = false;
            break;

        case 7:
            AvatarDatabase.MouthLocked[8] = false;
            break;

        case 8:
            AvatarDatabase.MouthLocked[5] = false;
            break;
        }
        StartCoroutine(theGiftScript.UpdateGifts(GiftID));
    }