// 删除邮件按钮 public void Btn_del() { if (nowMailObj != null) { Proto.MailReq tmp = new Proto.MailReq(); tmp.id = nowMail.id; tmp.uid = nowMail.uid; SocketClient.SendMsg(Route.info_mail_delMail, tmp); } }
// 领取邮件奖励按钮 public void Btn_getAward() { if (nowMailObj == null) { return; } if (nowMail.status == 2 || nowMail.items.Count == 0) { return; } Proto.MailReq tmp = new Proto.MailReq(); tmp.id = nowMail.id; tmp.uid = nowMail.uid; SocketClient.SendMsg(Route.info_mail_getMailAward, tmp); }
// 点击阅读邮件 public void OnMailToggleClick(GameObject mailObj, Proto.MailData mail) { nowMailObj = mailObj; nowMail = mail; senderText.text = mail.sendName; topicText.text = mail.topic; expireTimeText.text = "到期时间:" + mail.expireTime; contentText.text = mail.content; delBtn.gameObject.SetActive(true); if (mail.sendUid == 0) { responseBtn.SetActive(false); } else { responseBtn.SetActive(true); } if (mail.items.Count == 0) { getAwardBtn.gameObject.SetActive(false); InitMailAward(null); } else { getAwardBtn.gameObject.SetActive(true); if (mail.status == 2) { getAwardBtn.interactable = false; } else { getAwardBtn.interactable = true; } InitMailAward(mail.items); } if (mail.status == 0) { Proto.MailReq tmp = new Proto.MailReq(); tmp.id = mail.id; tmp.uid = mail.uid; SocketClient.SendMsg(Route.info_mail_readMail, tmp); } }