//------------------------------------------------------------------------------ // // 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) { EnemyType = (EnemyType)_buf.ReadInt(); LogicType = _buf.ReadString(); MaxHealth = _buf.ReadInt(); HpAddPerLevel = _buf.ReadInt(); AttackDamage = _buf.ReadInt(); AttackCooldown = _buf.ReadFloat(); AttackRange = _buf.ReadFloat(); Speed = _buf.ReadFloat(); DropPercent = _buf.ReadFloat(); Prefab = _buf.ReadString(); Prefab_Ref = null; } public static EnemyConfig DeserializeEnemyConfig(ByteBuf _buf) { return new EnemyConfig(_buf); } /// /// 敌人类型 /// public readonly EnemyType EnemyType; /// /// 逻辑类型 /// public readonly string LogicType; /// /// 最大生命 /// 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 float DropPercent; /// /// 预制体 /// 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 "{ " + "enemyType:" + EnemyType + "," + "logicType:" + LogicType + "," + "maxHealth:" + MaxHealth + "," + "hpAddPerLevel:" + HpAddPerLevel + "," + "attackDamage:" + AttackDamage + "," + "attackCooldown:" + AttackCooldown + "," + "attackRange:" + AttackRange + "," + "speed:" + Speed + "," + "dropPercent:" + DropPercent + "," + "prefab:" + Prefab + "," + "}"; } } }