游戏服相关
This commit is contained in:
67
Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs
Normal file
67
Assets/Scripts/Generate/NetworkProtocol/OuterCommon.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Fantasy;
|
||||
using NBC;
|
||||
using NBC.Network.Interface;
|
||||
using NBC.Serialize;
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
/// <summary>
|
||||
/// GameAccount实体类
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class RoleBaseInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleBaseInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleBaseInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
NickName = default;
|
||||
Head = default;
|
||||
Country = default;
|
||||
Level = default;
|
||||
Exp = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleBaseInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public string NickName { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string Head { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public string Country { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public int Level { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public int Exp { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 角色信息
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class RoleInfo : AMessage, IProto
|
||||
{
|
||||
public static RoleInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<RoleInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
BaseInfo = default;
|
||||
RoleId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<RoleInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public RoleBaseInfo BaseInfo { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoleId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user