private void UpdateDetail(int selectedIndex) { UnitInfo unitInfo = GetUnitInfo(selectedIndex); this.description.name.GetComponent <Text>().text = unitInfo.name; this.description.level.GetComponent <Text>().text = PartyDB.GetPartyLevel().ToString(); this.description.skillPoint.GetComponent <Text>().text = GetAvailableSkillPoint(unitInfo.nameInCode).ToString(); }
void Awake() { partyUnitNames = PartyDB.GetPartyUnits(); unitInfos = Parser.GetParsedUnitInfo(); skillInfos = Parser.GetParsedSkillInfo(); foreach (SkillInfo skillInfo in skillInfos) { string skillName = skillInfo.skill.GetName(); skillInfoByName[skillName] = skillInfo; } skillColumnInfos = Parser.GetSkillColumInfo(); InitializeUIs(); selectedIndex = 0; UpdateNameButtons(); UpdateSkills(selectedIndex); UpdateDetail(selectedIndex); UpdateUnitImage(selectedIndex); }
private int GetAvailableSkillPoint(string unitName) { return(PartyDB.GetPartyLevel() - GetAllUsedSkillPoint(unitName)); }