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(); } }
public void intelligenceDown() { if (intelligenceCntr > 1) { freePoints += 1; intelligenceCntr -= 1; HeroCharacteristics heroChars = heroes[curnum].GetComponent <HeroCharacteristics>(); damageCntr = heroChars.CalcDamage(intelligenceCntr); SetupMainCharacteristics(powerCntr, agilityCntr, intelligenceCntr); SetupUIComponents(); } }
public void PowerDown() { if (powerCntr > 1) { freePoints += 1; powerCntr -= 1; HeroCharacteristics heroChars = heroes[curnum].GetComponent <HeroCharacteristics>(); healthCntrerCntr = heroChars.CalcHealth(powerCntr); SetupMainCharacteristics(powerCntr, agilityCntr, intelligenceCntr); SetupUIComponents(); } }
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(); }
public void AcceptChoise() { var prefs = NetworkManagerCustom.singleton.spawnPrefabs; HeroCharacteristics prefChars = prefs[curnum + 1].GetComponent <HeroCharacteristics>(); var defaultPower = prefChars.power; var defaultAgility = prefChars.agility; var defaultintelligence = prefChars.inteintelligence; var defaultHealth = prefChars.GetHealth(); var defaultDamage = prefChars.GetDamage(); var defaultEvasion = prefChars.GetEvasion(); prefChars.SetCharacteristics(powerCntr, agilityCntr, intelligenceCntr, healthCntrerCntr, damageCntr, evasionCntr); ClientScene.AddPlayer(curnum); prefChars.SetCharacteristics(defaultPower, defaultAgility, defaultintelligence, defaultHealth, defaultDamage, defaultEvasion); }