Example #1
0
 public void Downgrade()
 {
     if (Upgrades.IndexOf(CurrentUpgrade as MonoBehaviour) != 0)
     {
         CurrentUpgrade = Upgrades[Upgrades.IndexOf(CurrentUpgrade as MonoBehaviour) - 1] as IGameUpgrade;
     }
     else
     {
         SceneManager.LoadScene(0);
     }
 }
Example #2
0
 public void Upgrade()
 {
     if (Upgrades.IndexOf(CurrentUpgrade as MonoBehaviour) != Upgrades.Count - 1)
     {
         CurrentUpgrade = Upgrades[Upgrades.IndexOf(CurrentUpgrade as MonoBehaviour) + 1] as IGameUpgrade;
     }
     else
     {
         SceneManager.LoadScene(3);
     }
     Debug.Log(CurrentUpgrade.GetType());
 }
Example #3
0
 private void Awake()
 {
     ValidateUpgrades();
     CurrentUpgrade = Upgrades[0] as IGameUpgrade;
 }