81 lines
2.7 KiB
C#
81 lines
2.7 KiB
C#
|
|
//------------------------------------------------------------------------------
|
|
// <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);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.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;
|
|
Sprite = _buf.ReadString();
|
|
Sprite_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>
|
|
/// statType
|
|
/// </summary>
|
|
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
|
public readonly System.Collections.Generic.List<int> InitialItems;
|
|
public readonly string Prefab;
|
|
public EntityConfig Prefab_Ref;
|
|
public readonly string Sprite;
|
|
public SpriteConfig Sprite_Ref;
|
|
|
|
public const int __ID__ = -1280631944;
|
|
public override int GetTypeId() => __ID__;
|
|
|
|
public void ResolveRef(Tables tables)
|
|
{
|
|
|
|
|
|
|
|
|
|
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
|
|
|
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
|
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "{ "
|
|
+ "name:" + Name + ","
|
|
+ "maxHealth:" + MaxHealth + ","
|
|
+ "speed:" + Speed + ","
|
|
+ "coin:" + Coin + ","
|
|
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
|
+ "initialItems:" + Luban.StringUtil.CollectionToString(InitialItems) + ","
|
|
+ "prefab:" + Prefab + ","
|
|
+ "sprite:" + Sprite + ","
|
|
+ "}";
|
|
}
|
|
}
|
|
|
|
}
|