public void RemoveMail(MailInfo info) { for (int i = 0; i < m_mailList.Count; ++i) { if (m_mailList[i] == info) { GameEvent.instance.OnEventRemoveMail(info); m_mailList.RemoveAt(i); break; } } }
public void Init(MailInfo info) { m_titleText = transform.Find("Title").GetComponent <Text>(); m_dateText = transform.Find("Date").GetComponent <Text>(); m_info = info; m_titleText.text = m_info.Name; m_dateText.text = System.DateTime.Now.ToString("MM-dd"); transform.Find("Background").GetComponent <Button>().onClick.AddListener(OnButtonUp); }
void OnEventRemoveMail(MailInfo info) { for (int i = 0; i < m_slotList.Count; ++i) { if (m_slotList[i].info == info) { Destroy(m_slotList[i].gameObject); m_slotList.RemoveAt(i); break; } } }
void OnEventPlayDialog(NPC npc) { m_isSucceeded = true; GameEvent.instance.EventPlayDialog -= OnEventPlayDialog; GameEvent.instance.OnEventNotice("퀘스트 : " + m_data.Name + " 성공!", 3f, false); //TODO 서버가 없어서 우선 테스트 용으로 처리 MailInfo mail = new MailInfo(); mail.Name = "katana"; mail.Description = "Item Katana"; mail.RewardItemID = 0; Mail.instance.AddMail(mail); //GameEvent.instance.OnEventArriveMail(mail); }
public void AddMail(MailInfo info) { GameEvent.instance.OnEventArriveMail(info); m_mailList.Add(info); }
void OnEventArriveMail(MailInfo mailInfo) { m_mailRedDotImage.gameObject.SetActive(true); }
public void OnEventRemoveMail(MailInfo info) { EventRemoveMail?.Invoke(info); }
public void OnEventArriveMail(MailInfo info) { EventArriveMail?.Invoke(info); }