public void Set_Abilities(Player_universal.Ability_Typ _abilities) { int _numbers = 1; for (int i = 0; i < _abilitieUIs.Count; i++) { if (i >= _abilities.slots) { ShowAbility(_abilitieUIs[i], false); continue; } ShowAbility(_abilitieUIs[i], true); if (_abilities.abilities.Count <= i) { _abilitieUIs[i].ShowEmpty(); _abilitieUIs[i].SetNumber(_numbers); _numbers++; } else { _abilitieUIs[i].UpdateDisplay(_abilities.abilities[i]); _abilitieUIs[i].SetNumber(_numbers); _numbers++; } } }
public void SetSlots(Player_universal.Ability_Typ abilities) { Debug.Log(abilities.abilities.Count); for (int i = 0; i < 8; i++) { if (i < abilities.slots) { if (i >= abilities.slots || (DontShowEmptySpace && abilities.abilities.Count <= i)) { Debug.Log("other here"); slots[i].gameObject.SetActive(false); } else if (abilities.abilities.Count <= i) { Debug.Log("Bruuuuuuuu"); slots[i].gameObject.SetActive(true); slots[i].SetEmpty(); } else { slots[i].gameObject.SetActive(true); slots[i].SetUI(abilities.abilities[i]); } } } }
public void GoToSelectTyp() { SelectedFolder_p = null; SelectedFolder_p = null; ability_selected = null; CS = currentSelection.selectTyp; UI.GetComponent <TestUI>().EmptyBackpack(); UI.GetComponent <TestUI>().EmptyPlayer(); }
public void GoToAbilitySelector(int typ) { SelectedFolder_p = playerStats.Ability_typs[typ]; SelectedFolder_b = backpack.abilities[typ]; BackPackAbilityUI(); PlayerAbilityUI(); ability_selected = null; CS = currentSelection.selectAbility; Seach_in_backpack = false; }
public void GoToAbilitySelector(Player_universal.Ability_Typ SelectedFolder_1, Player_universal.Ability_Typ SelectedFolder_2) { SelectedFolder_p = SelectedFolder_1; SelectedFolder_b = SelectedFolder_2; BackPackAbilityUI(); PlayerAbilityUI(); ability_selected = null; CS = currentSelection.selectAbility; UI.GetComponent <TestUI>().EmptyAction(); Debug.Log(SelectedFolder_p._name); SetNumbers(Seach_in_backpack); }
public void setPlayerAbilities(Player_universal.Ability_Typ folder) { if (testUI) { slots_p = folder.slots; playerUI.Set_Abilities(folder); return; } string _string = ""; for (int i = 0; i < folder.slots; i++) { if (folder.abilities.Count <= i || folder.abilities[i] == null) { _string += "Empty \n"; } else { _string += folder.abilities[i]._name + "\n"; } } abilities_p.text = _string; }