示例#1
0
 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);
 }
示例#2
0
 private void Save()
 {
     PlayerPrefs2.SetUlong(AddName("Amount"), _amount);
 }
示例#3
0
 private void Load()
 {
     _amount          = PlayerPrefs2.GetUlong(AddName("Amount"), 0);
     UnitImage.sprite = UnitSprites [TechLevel];
 }
示例#4
0
 private void Awake()
 {
     _bought = PlayerPrefs2.GetBool(AddName("Bought"), false);
 }