public void BuyTech() { Upgrade(); Resources.Instance.TakeResources(Cost); _bought = true; TechButton.GetComponent <Button> ().interactable = !_bought; foreach (var tech in TechsUnlocked) { tech.CheckUnlock(); } PlayerPrefs2.SetBool(AddName("Bought"), _bought); }
private void Save() { PlayerPrefs2.SetUlong(AddName("Amount"), _amount); }
private void Load() { _amount = PlayerPrefs2.GetUlong(AddName("Amount"), 0); UnitImage.sprite = UnitSprites [TechLevel]; }
private void Awake() { _bought = PlayerPrefs2.GetBool(AddName("Bought"), false); }