//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
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);
}
///
/// 名称
///
public readonly string Name;
///
/// 最大生命
///
public readonly int MaxHealth;
///
/// 每关卡增加生命
///
public readonly int HpAddPerLevel;
///
/// 基础伤害
///
public readonly int AttackDamage;
///
/// 攻击间隔
///
public readonly float AttackCooldown;
///
/// 攻击范围
///
public readonly float AttackRange;
///
/// 移动速度
///
public readonly float Speed;
///
/// 金币掉落
///
public readonly int CoinDrop;
///
/// 经验掉落
///
public readonly int ExpDrop;
///
/// 掉落概率
///
public readonly float DropPercent;
///
/// 缩放
///
public readonly float Scale;
///
/// 颜色
///
public readonly string Color;
///
/// 预制体
///
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 + ","
+ "}";
}
}
}