Beispiel #1
0
    public void LoadMutation(int mutationIndex, bool equipped)
    {
        int equip = equipped ? 1 : 0;

        PlayerPrefs.SetInt("Equipped:" + mutationIndex, equip);
        PlayerPrefs.Save();

        equippedImgs[mutationIndex].sprite = equipped ? equippedSprite : unequippedSprite;
        switch (mutationIndex)
        {
        case 0:
            fish.AddFollower(equipped);
            break;

        case 1:
            laserController.UpgradeStun(equipped);
            break;

        case 2:
            fish.AddShield(equipped);
            break;

        case 3:
            laserController.UpgradeDamage(equipped);
            break;

        case 4:
            fish.AddHP(equipped);
            break;

        case 5:
            fish.AddLaserBeam(equipped);
            break;

        /*case 6:
         *  laserController.UpgradeRate(equipped);
         *  break;
         * case 7:
         *  fish.AddLaserBeam(equipped);
         * break;*/
        default:
            break;
        }
    }