private void OnAddMail(Message.MailData data) { Mail mail = GameObject.Instantiate <Mail>(mail_prefab); mail.SetMailData(data); mail.transform.SetParent(contents); }
public Message.MailData AddMail(Message.MailData data) { Debug.Log("recv mail:" + data.mail_message); mail_datas.Add(data.mail_seq, data); Util.EventSystem.Publish <Message.MailData>(Event.AddMail, data); return(data); }
public IEnumerator GetEnumerator() { foreach (var itr in mail_datas) { Message.MailData mail = itr.Value; yield return(mail); } }
public Message.MailData GetMail(UInt64 mailSEQ) { Message.MailData data = null; if (false == mail_datas.TryGetValue(mailSEQ, out data)) { return(null); } return(data); }
public void SetMailData(Message.MailData data) { mail_seq = data.mail_seq; mail_message.text = data.mail_message; DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0); dateTime.AddSeconds(data.expire_date); expire_date.text = dateTime.ToString("yyyy-MM-dd HH:mm:ss"); }