新定义
This commit is contained in:
47
Assets/Scripts/Generate/NetworkProtocol/Mail.cs
Normal file
47
Assets/Scripts/Generate/NetworkProtocol/Mail.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Fantasy;
|
||||
using NBC;
|
||||
using NBC.Network.Interface;
|
||||
using NBC.Serialize;
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class MailInfo : AMessage, IProto
|
||||
{
|
||||
public static MailInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MailInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
Title = default;
|
||||
Content = default;
|
||||
SendTime = default;
|
||||
Type = default;
|
||||
Items.Clear();
|
||||
IsRead = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MailInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string Title { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public string Content { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public long SendTime { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public int Type { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public List<AwardInfo> Items = new List<AwardInfo>();
|
||||
[ProtoMember(7)]
|
||||
public bool IsRead { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user