Example #1
0
    void OnMachineUnlocked(MachineInfo machineInfo)
    {
        List <ProgressionInfo> progressionInfos = progressionScanner.RequiringUnlockedMachine(machineInfo);

        ProgressionApplyer.ApplyRewards(progressionInfos);
        ListPool <ProgressionInfo> .Release(progressionInfos);
    }
Example #2
0
    void OnLevelChanged()
    {
        long level = CurrencySystem.instance.save.level;

        if (lastLevel < level)
        {
            List <ProgressionInfo> progressionInfos = progressionScanner.RequiringLevelInRange(lastLevel, level);
            ProgressionApplyer.ApplyRewards(progressionInfos);
            ListPool <ProgressionInfo> .Release(progressionInfos);
        }
        lastLevel = level;
    }
Example #3
0
    void OnMoneyChanged()
    {
        long money = CurrencySystem.instance.save.money;

        if (lastMoney < money)
        {
            List <ProgressionInfo> progressionInfos = progressionScanner.RequiringMoneyInRange(lastMoney, money);
            ProgressionApplyer.ApplyRewards(progressionInfos);
            ListPool <ProgressionInfo> .Release(progressionInfos);
        }
        lastMoney = money;
    }
Example #4
0
    void LoadComplete()
    {
        lastMoney = CurrencySystem.instance.save.money;
        lastLevel = CurrencySystem.instance.save.level;

        List <ProgressionInfo> progressionInfos = progressionScanner.RequiringMoneyInRange(0, lastMoney);

        ProgressionApplyer.ApplyRewards(progressionInfos);
        ListPool <ProgressionInfo> .Release(progressionInfos);

        progressionInfos = progressionScanner.RequiringLevelInRange(0, lastLevel);
        ProgressionApplyer.ApplyRewards(progressionInfos);
        ListPool <ProgressionInfo> .Release(progressionInfos);

        MachineInfo[] machineInfos = MachineUnlockSystem.instance.unlocked.ToArray();
        for (int i = 0, len = machineInfos.Length; i < len; i++)
        {
            progressionInfos = progressionScanner.RequiringUnlockedMachine(machineInfos[i]);
            ProgressionApplyer.ApplyRewards(progressionInfos);
            ListPool <ProgressionInfo> .Release(progressionInfos);
        }
    }
Example #5
0
 public void ApplyStartingProgressions()
 {
     ProgressionApplyer.ApplyRewards(startingProgressions);
 }