private void InitializeInventoryItems() { for (int i = 0, j = SoulController.Instance.Souls.Count; i < j; i++) { SoulInformation newSoul = Instantiate(SoulItemPlaceHolder.gameObject, ContentParent).GetComponent <SoulInformation>(); newSoul.SetSoulItem(SoulController.Instance.Souls[i], () => SoulItem_OnClick(newSoul)); } SoulItemPlaceHolder.gameObject.SetActive(false); }
private void ClearSoulInformation() { Description.text = ""; Name.text = ""; Avatar.sprite = null; SetupUseButton(false); SetupDestroyButton(false); CurrentSelectedGameObject = null; CurrentSoulInformation = null; }
public void SoulItem_OnClick(SoulInformation soulInformation) { CurrentSoulInformation = soulInformation; CurrentSelectedGameObject = soulInformation.gameObject; SetupSoulInformation(soulInformation.soulItem); }