Example #1
0
 public void levelUP()
 {
     level         = level + 1;
     maxHP         = maxHP + 10;
     hp            = maxHP;
     maxAP         = maxAP + 10;
     ap            = maxAP;
     strength     += 1;
     baseStrength += 1;
     maxStrength  += 1;
     exp           = 0;
     nextLevel     = nextLevel * 2;
     levelU.text   = "Level = " + level.ToString() + "\n" +
                     "HP = " + maxHP.ToString() + "\n" +
                     "AP = " + maxAP.ToString() + "\n" +
                     "Intelligence = " + strength.ToString() + "\n";
     winText.text = "You Win!";
     if (level == 3)
     {
         ability2.gameObject.SetActive(true);
         levelU.text += "Gained new ability";
     }
     if (level == 5)
     {
         ultimate.gameObject.SetActive(true);
         levelU.text += "Gained ultimate ability";
     }
     if (player.getLevel() < level)
     {
         StartCoroutine("LevelWait");
     }
     else
     {
         StartCoroutine("Wait");
     }
 }