mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
更新编辑器MenuItem导表与导出协议
更新编辑器MenuItem导表与导出协议
This commit is contained in:
@@ -7,32 +7,22 @@
|
||||
//------------------------------------------------------------------------------
|
||||
using Bright.Serialization;
|
||||
using System.Collections.Generic;
|
||||
using SimpleJSON;
|
||||
|
||||
|
||||
|
||||
namespace GameConfig.item
|
||||
{
|
||||
|
||||
{
|
||||
public sealed partial class ItemExchange : Bright.Config.BeanBase
|
||||
{
|
||||
public ItemExchange(JSONNode _json)
|
||||
public ItemExchange(ByteBuf _buf)
|
||||
{
|
||||
{ if(!_json["id"].IsNumber) { throw new SerializationException(); } Id = _json["id"]; }
|
||||
{ if(!_json["num"].IsNumber) { throw new SerializationException(); } Num = _json["num"]; }
|
||||
Id = _buf.ReadInt();
|
||||
Num = _buf.ReadInt();
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public ItemExchange(int id, int num )
|
||||
public static ItemExchange DeserializeItemExchange(ByteBuf _buf)
|
||||
{
|
||||
this.Id = id;
|
||||
this.Num = num;
|
||||
PostInit();
|
||||
}
|
||||
|
||||
public static ItemExchange DeserializeItemExchange(JSONNode _json)
|
||||
{
|
||||
return new item.ItemExchange(_json);
|
||||
return new item.ItemExchange(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -67,4 +57,5 @@ public sealed partial class ItemExchange : Bright.Config.BeanBase
|
||||
partial void PostInit();
|
||||
partial void PostResolve();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user