迁移数据表到 Luban,移除 JsonNet、EnumUtility
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 EnemyConfig : Luban.BeanBase
|
||||
{
|
||||
public EnemyConfig(ByteBuf _buf)
|
||||
{
|
||||
Name = _buf.ReadString();
|
||||
MaxHealth = _buf.ReadInt();
|
||||
HpAddPerLevel = _buf.ReadInt();
|
||||
AttackDamage = _buf.ReadInt();
|
||||
AttackCooldown = _buf.ReadFloat();
|
||||
AttackRange = _buf.ReadFloat();
|
||||
Speed = _buf.ReadFloat();
|
||||
CoinDrop = _buf.ReadInt();
|
||||
ExpDrop = _buf.ReadInt();
|
||||
DropPercent = _buf.ReadFloat();
|
||||
Scale = _buf.ReadFloat();
|
||||
Color = _buf.ReadString();
|
||||
Prefab = _buf.ReadString();
|
||||
Prefab_Ref = null;
|
||||
}
|
||||
|
||||
public static EnemyConfig DeserializeEnemyConfig(ByteBuf _buf)
|
||||
{
|
||||
return new EnemyConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
/// <summary>
|
||||
/// 最大生命
|
||||
/// </summary>
|
||||
public readonly int MaxHealth;
|
||||
/// <summary>
|
||||
/// 每关卡增加生命
|
||||
/// </summary>
|
||||
public readonly int HpAddPerLevel;
|
||||
/// <summary>
|
||||
/// 基础伤害
|
||||
/// </summary>
|
||||
public readonly int AttackDamage;
|
||||
/// <summary>
|
||||
/// 攻击间隔
|
||||
/// </summary>
|
||||
public readonly float AttackCooldown;
|
||||
/// <summary>
|
||||
/// 攻击范围
|
||||
/// </summary>
|
||||
public readonly float AttackRange;
|
||||
/// <summary>
|
||||
/// 移动速度
|
||||
/// </summary>
|
||||
public readonly float Speed;
|
||||
/// <summary>
|
||||
/// 金币掉落
|
||||
/// </summary>
|
||||
public readonly int CoinDrop;
|
||||
/// <summary>
|
||||
/// 经验掉落
|
||||
/// </summary>
|
||||
public readonly int ExpDrop;
|
||||
/// <summary>
|
||||
/// 掉落概率
|
||||
/// </summary>
|
||||
public readonly float DropPercent;
|
||||
/// <summary>
|
||||
/// 缩放
|
||||
/// </summary>
|
||||
public readonly float Scale;
|
||||
/// <summary>
|
||||
/// 颜色
|
||||
/// </summary>
|
||||
public readonly string Color;
|
||||
/// <summary>
|
||||
/// 预制体
|
||||
/// </summary>
|
||||
public readonly string Prefab;
|
||||
public EntityConfig Prefab_Ref;
|
||||
|
||||
public const int __ID__ = 1284055242;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "name:" + Name + ","
|
||||
+ "maxHealth:" + MaxHealth + ","
|
||||
+ "hpAddPerLevel:" + HpAddPerLevel + ","
|
||||
+ "attackDamage:" + AttackDamage + ","
|
||||
+ "attackCooldown:" + AttackCooldown + ","
|
||||
+ "attackRange:" + AttackRange + ","
|
||||
+ "speed:" + Speed + ","
|
||||
+ "coinDrop:" + CoinDrop + ","
|
||||
+ "expDrop:" + ExpDrop + ","
|
||||
+ "dropPercent:" + DropPercent + ","
|
||||
+ "scale:" + Scale + ","
|
||||
+ "color:" + Color + ","
|
||||
+ "prefab:" + Prefab + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user