public void Setup(VoreBasic organ) { btn = btn != null ? btn : GetComponent <Button>(); title = title != null ? title : GetComponentInChildren <TextMeshProUGUI>(); this.organ = organ; btn.onClick.AddListener(Toggle); SetText(organ.Digestion); }
private void SortPrey(VoreBasic voreOrgan) { preyContainer.KillChildren(); optionContainer.KillChildren(); Instantiate(optionBtn, optionContainer).Setup(voreOrgan); organText.text = voreOrgan.VoreContainers.ToString(); SetupPrey(voreOrgan); if (voreOrgan is VoreVagina voreVagina) { if (player.Vore.Perks.HasPerk(VorePerks.ReBirth)) { Instantiate(rebithBtn, optionContainer).Setup(voreVagina); } } ChangeDrainEss(); }
private void SetupPrey(VoreBasic voreOrgan) => voreOrgan.Preys.ForEach(p => Instantiate(vorePrey, preyContainer).Setup(p, voreOrgan.VoreContainers).onClick.AddListener(() => ClickPrey(p, voreOrgan.VoreContainers)));
private string Capacity(VoreBasic organ) => $"{organ.VoreContainers.ToString()}: {Settings.KgorPWithOutSuffix(organ.Current)}/{Settings.KgorP(organ.MaxCapacity())}";