public void AddPoint() { // Find a better way for this abi.AddPoint(); UpdatePoints(); UpdateDescriptions(); UpdateButtons(); classScript.SetTexts(); }
public void ResetTree() { // Use this method in ClassScript aswell ClassScript.spentPoints -= spentPoints; ClassScript.requiredLevel -= spentPoints; ClassScript.availableTalentPoints += spentPoints; spentPoints = 0; activeRaws = 1; for (int j = 7; j > 0; j--) { Transform currentRaw = transform.GetChild(j); for (int k = currentRaw.childCount - 1; k >= 0; k--) { Transform currentAbility = currentRaw.GetChild(k); currentAbility.GetComponent <Ability>().points = 0; currentAbility.GetComponent <Ability>().UpdateElements(); currentAbility.GetComponent <Ability>().UpdatePoints(); } } SetNextRawAvailable(); classScript.SetTexts(); }