예제 #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);
 }