summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/PerkCostModifyer.cs
blob: d4e2d629c0e6a466d68f01b5e8c837511cdbe928 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
using UnityEngine;

public class PerkCostModifyer : MonoBehaviour
{
	public Equippable requiredPerk;

	public int[] upgradeCostChange;

	private void Start()
	{
		if (PerkManager.IsEquipped(requiredPerk))
		{
			BuildSlot component = GetComponent<BuildSlot>();
			for (int i = 0; i < component.Upgrades.Count; i++)
			{
				component.Upgrades[i].cost += upgradeCostChange[i];
			}
		}
		Object.Destroy(this);
	}
}