private void ApplyMultiplierToProducts() { if (localTimerReductionMultiplier != MultiplierManager.Instance.TimerReductionMultiplier) { prodScript.productInformation.timeToSell /= 1 - localTimerReductionMultiplier; prodScript.productInformation.timeToSell *= 1 - MultiplierManager.Instance.TimerReductionMultiplier; localTimerReductionMultiplier = MultiplierManager.Instance.TimerReductionMultiplier; } if (localDirtyMoneyMultiplier != MultiplierManager.Instance.DirtyMoneyIncreaseMultiplier) { prodScript.productInformation.dirtyMoney /= 1 + localDirtyMoneyMultiplier; prodScript.productInformation.dirtyMoney *= 1 + MultiplierManager.Instance.DirtyMoneyIncreaseMultiplier; localDirtyMoneyMultiplier = MultiplierManager.Instance.DirtyMoneyIncreaseMultiplier; prodScript.productInformation.cleanMoney = prodScript.productInformation.dirtyMoney * MultiplierManager.Instance.CleanMoneyIncreaseMultiplier; prodScript.productInformation.reputation = prodScript.productInformation.dirtyMoney * MultiplierManager.Instance.ReputationIncreaseMultiplier; } if (localCleanMoneyMultiplier != MultiplierManager.Instance.CleanMoneyIncreaseMultiplier) { prodScript.productInformation.cleanMoney = prodScript.productInformation.dirtyMoney * MultiplierManager.Instance.CleanMoneyIncreaseMultiplier; localCleanMoneyMultiplier = MultiplierManager.Instance.CleanMoneyIncreaseMultiplier; } if (localReputationMultiplier != MultiplierManager.Instance.ReputationIncreaseMultiplier) { prodScript.productInformation.reputation = prodScript.productInformation.dirtyMoney * MultiplierManager.Instance.ReputationIncreaseMultiplier; localReputationMultiplier = MultiplierManager.Instance.ReputationIncreaseMultiplier; } prodScript.UpdateAndDisplayProductInformationValuesAndText(); }
public void LevelUp() { CheckRequirements(); if (canPurchase) { CurrencyManager.Instance.TotalIncomeGate(true, Income.DirtyMoney, upgradeCost); prodInfoScript.productInformation.timeToSell = timerNextValue; prodInfoScript.productInformation.dirtyMoney = dirtyMoneyNextValue; prodInfoScript.productInformation.cleanMoney = cleanMoneyNextValue; prodInfoScript.productInformation.reputation = reputationNextValue; prodInfoScript.productInformation.level++; upgradeCost = Mathf.RoundToInt(upgradeCost * upgradeCostMultiplier); prodInfoScript.UpdateAndDisplayProductInformationValuesAndText(); CalculateProductUpgradeValues(); CheckRequirements(); return; } }