迁移数据表到 Luban,移除 JsonNet、EnumUtility
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using Luban;
|
||||
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public sealed partial class RoleConfig : Luban.BeanBase
|
||||
{
|
||||
public RoleConfig(ByteBuf _buf)
|
||||
{
|
||||
Name = _buf.ReadString();
|
||||
MaxHealth = _buf.ReadInt();
|
||||
Speed = _buf.ReadFloat();
|
||||
Coin = _buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);InitialItems = new System.Collections.Generic.List<int>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { int _e0; _e0 = _buf.ReadInt(); InitialItems.Add(_e0);}}
|
||||
Prefab = _buf.ReadString();
|
||||
Prefab_Ref = null;
|
||||
}
|
||||
|
||||
public static RoleConfig DeserializeRoleConfig(ByteBuf _buf)
|
||||
{
|
||||
return new RoleConfig(_buf);
|
||||
}
|
||||
|
||||
public readonly string Name;
|
||||
public readonly int MaxHealth;
|
||||
public readonly float Speed;
|
||||
public readonly int Coin;
|
||||
/// <summary>
|
||||
/// key
|
||||
/// </summary>
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
public readonly System.Collections.Generic.List<int> InitialItems;
|
||||
public readonly string Prefab;
|
||||
public EntityConfig Prefab_Ref;
|
||||
|
||||
public const int __ID__ = -1280631944;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "name:" + Name + ","
|
||||
+ "maxHealth:" + MaxHealth + ","
|
||||
+ "speed:" + Speed + ","
|
||||
+ "coin:" + Coin + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "initialItems:" + Luban.StringUtil.CollectionToString(InitialItems) + ","
|
||||
+ "prefab:" + Prefab + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user