Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        //Debug.Log("Drop.cs called Start()");
        rt = GetComponent <RectTransform>();
        if (PlayerPrefsInfo.Int2Bool(PlayerPrefs.GetInt(PlayerPrefsInfo.s_sabotage)))
        {
            sabotageIsOn = true;
        }
        if (PlayerPrefsInfo.Int2Bool(PlayerPrefs.GetInt(PlayerPrefsInfo.s_tougherEnemies)))
        {
            tougherEnemiesIsOn = true;
            omniBoost          = PlayerPrefsInfo.GetOmnitechDropRateBoost(); //value between 0 and 1
        }

        omnitechTypes = new List <string> {
            "cooldown", "energyGain", "comboKey", "selfRepair"
        };
    }
Esempio n. 2
0
    //apply risk bonuses to drop/rarity rates
    //called in ConfigureEnemy
    void ApplyRiskBonuses()
    {
        float boost;

        //drop rates
        boost        = (PlayerPrefsInfo.GetDropRateBoost() * 100f);
        lowDropRate += boost;
        if (lowDropRate > 100f)
        {
            lowDropRate = 100f;
        }
        medDropRate += boost;
        if (medDropRate > 100f)
        {
            medDropRate = 100f;
        }
        highDropRate += boost;
        if (highDropRate > 100f)
        {
            highDropRate = 100f;
        }
        //rarity rates
        boost         = (PlayerPrefsInfo.GetRarityRateBoost() * 100f);
        normalChance += boost;
        if (normalChance > 100f)
        {
            normalChance = 100f;
        }
        rareChance += boost;
        if (rareChance > 100f)
        {
            rareChance = 100f;
        }
        //omnitech drop rates
        boost           = (PlayerPrefsInfo.GetOmnitechDropRateBoost() * 100f);
        omnitechChance += boost;
        if (omnitechChance > 100f)
        {
            omnitechChance = 100f;
        }
    }