Пример #1
0
 public void AgilityDown()
 {
     if (agilityCntr > 1)
     {
         freePoints  += 1;
         agilityCntr -= 1;
         HeroCharacteristics heroChars = heroes[curnum].GetComponent <HeroCharacteristics>();
         evasionCntr = heroChars.CalcEvasion(agilityCntr);
         SetupMainCharacteristics(powerCntr, agilityCntr, intelligenceCntr);
         SetupUIComponents();
     }
 }
Пример #2
0
    void ChangeHero(int num)
    {
        gameObject.GetComponentsInChildren <Image>()[1].sprite = heroes [num].GetComponent <SpriteRenderer>().sprite;
        gameObject.GetComponentInChildren <TMP_Text> ().text   = heroesNames [num];

        HeroCharacteristics heroChars = heroes[num].GetComponent <HeroCharacteristics>();

        SetupMainCharacteristics(heroChars.power, heroChars.agility, heroChars.inteintelligence);
        damageCntr       = heroChars.CalcDamage(intelligenceCntr);
        healthCntrerCntr = heroChars.CalcHealth(powerCntr);
        evasionCntr      = heroChars.CalcEvasion(agilityCntr);
        freePoints       = 0;
        SetupUIComponents();
    }