private void UpdateAllSlotsDisplay() { foreach (SkillSlot key in _skillSlotsUI.Keys) { Skill[] slots = _skillBook.GetSkillSlots(key); SkillSlotUI[] slotsUI = _skillSlotsUI[key]; for (int i = 0; i < slots.Length; i++) { slotsUI[i].RegisterSlotUI(_skillBook.Owner, i); slotsUI[i].UpdateSlotUI(slots[i]); } } }
private string[] GetSkillsID(SkillBook skillBook, SkillSlot slot) { var skills = skillBook.GetSkillSlots(slot); string[] array = new string[skills.Length]; for (int i = 0; i < skills.Length; i++) { array[i] = skills[i] == null ? string.Empty : skills[i].SkillSO.ID; } return(array); }
private List <Skill> CollectSkills(SkillBook skillBook) { List <Skill> skills = new List <Skill>(); foreach (SkillSlot slot in Enum.GetValues(typeof(SkillSlot))) { if (slot == SkillSlot.Passive) { continue; } Skill[] slots = skillBook.GetSkillSlots(slot); for (int i = 0; i < slots.Length; i++) { if (slots[i] != null) { skills.Add(slots[i]); } } } return(skills); }