/// <summary> 메일 첨부 아이템 수령 버튼을 눌렀을 때 </summary> void ReceiveItme(UIMailSlot mailSlot)//, Action<bool> isResult) { bool result = false; // mailDataList.FindAll(x => x.mailID == mailSlot.mailID); StartCoroutine(MailReceiveItemCoroutine(mailSlot.mailID, x => result = x)); //isResult(result); Debug.Log(result); }
/// <summary> 미사용 중인 slot을 리턴해준다. </summary> public UIMailSlot GetMailSlotFromPool() { UIMailSlot uIMailSlot = mailSlotPool.Find(x => !x.gameObject.activeSelf); if (uIMailSlot == null) { GameObject go = Instantiate(mailSlotPrefab); uIMailSlot = go.GetComponent <UIMailSlot>(); mailSlotPool.Add(uIMailSlot); } return(uIMailSlot); }
void UpdateContent() { if (isNeedToShow) { if (mailSlot) { return; } mailSlot = UIMail.Instance.GetMailSlotFromPool(); mailSlot.gameObject.SetActive(true); } else { mailSlot = null; } }