NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/UI/Mail/RedPointNodeMail.cs

28 lines
678 B
C#

using System;
using Framework;
using Gameplay.Level;
public class RedPointNodeMail : RedPointNode
{
public RedPointNodeMail(int id) : base(id)
{
}
protected override EventManager.EventName[] eventsToRegister => new[]
{ EventManager.EventName.HaveNewMail };
protected override int GetCount()
{
if (param == null)
throw new Exception($"param is null! id:{ID}");
var mailID = (uint)param;
var mailInfo = MailSystem.Instance.GetMail(mailID);
if (mailInfo != null)
{
if (mailInfo.Status!=MailSystem.MailStatus_Cliamed)
return 1;
}
return 0;
}
}