重构清理敌人类

This commit is contained in:
2026-09-15 11:07:01 +08:00
parent 421f8bf619
commit 88ed35e757
34 changed files with 568 additions and 457 deletions
+112 -10
View File
@@ -18,15 +18,31 @@ public sealed partial class GlobalConfig : Luban.BeanBase
{
WeaponCapacity = _buf.ReadInt();
PropMaxCount = _buf.ReadInt();
PlayerEntity = _buf.ReadString();
PlayerEntity_Ref = null;
WeaponRecycleRate = _buf.ReadInt();
ShopGoodsCount = _buf.ReadInt();
ShopPriceRandomPercent = _buf.ReadInt();
ShopMinPrice = _buf.ReadInt();
LevelUpRefreshPriceBase = _buf.ReadInt();
LevelUpRewardCount = _buf.ReadInt();
EnemyGroupName = _buf.ReadString();
SpawnEnemyMaxCount = _buf.ReadInt();
SpawnDistanceFromPlayer = _buf.ReadInt();
EnemySpawnDistanceMin = _buf.ReadInt();
EnemySpawnDistanceMax = _buf.ReadInt();
WeaponRotateSpeed = _buf.ReadInt();
PlayerGroupName = _buf.ReadString();
EnemyGroupName = _buf.ReadString();
ProjectileGroupName = _buf.ReadString();
DropGroupName = _buf.ReadString();
EffectGroupNmae = _buf.ReadString();
MinDamage = _buf.ReadInt();
MaxDodgeRate = _buf.ReadInt();
MinSpawnRateScale = _buf.ReadInt();
ProjectileLifeTime = _buf.ReadInt();
ProjectileHeightOffset = _buf.ReadInt();
ProjectileSpeed = _buf.ReadInt();
ProjectileEntity = _buf.ReadString();
ProjectileEntity_Ref = null;
}
public static GlobalConfig DeserializeGlobalConfig(ByteBuf _buf)
@@ -43,6 +59,11 @@ public sealed partial class GlobalConfig : Luban.BeanBase
/// </summary>
public readonly int PropMaxCount;
/// <summary>
/// 玩家实体
/// </summary>
public readonly string PlayerEntity;
public EntityConfig PlayerEntity_Ref;
/// <summary>
/// 武器回收价比例
/// </summary>
public readonly int WeaponRecycleRate;
@@ -67,17 +88,70 @@ public sealed partial class GlobalConfig : Luban.BeanBase
/// </summary>
public readonly int LevelUpRewardCount;
/// <summary>
/// 敌人对象池名
/// </summary>
public readonly string EnemyGroupName;
/// <summary>
/// 最大敌人数量
/// </summary>
public readonly int SpawnEnemyMaxCount;
/// <summary>
/// 敌人生成距离
/// 敌人生成最小距离
/// </summary>
public readonly int SpawnDistanceFromPlayer;
public readonly int EnemySpawnDistanceMin;
/// <summary>
/// 敌人生成最大距离
/// </summary>
public readonly int EnemySpawnDistanceMax;
/// <summary>
/// 武器旋转速度
/// </summary>
public readonly int WeaponRotateSpeed;
/// <summary>
/// 玩家对象组名
/// </summary>
public readonly string PlayerGroupName;
/// <summary>
/// 敌人对象组名
/// </summary>
public readonly string EnemyGroupName;
/// <summary>
/// 投射物对象组名
/// </summary>
public readonly string ProjectileGroupName;
/// <summary>
/// 掉落物对象组名
/// </summary>
public readonly string DropGroupName;
/// <summary>
/// 特效对象组名
/// </summary>
public readonly string EffectGroupNmae;
/// <summary>
/// 最小伤害
/// </summary>
public readonly int MinDamage;
/// <summary>
/// 闪避率上限
/// </summary>
public readonly int MaxDodgeRate;
/// <summary>
/// 最小刷怪速度倍数
/// </summary>
public readonly int MinSpawnRateScale;
/// <summary>
/// 投射物生命周期
/// </summary>
public readonly int ProjectileLifeTime;
/// <summary>
/// 投射物生成高度
/// </summary>
public readonly int ProjectileHeightOffset;
/// <summary>
/// 投射物移动速度
/// </summary>
public readonly int ProjectileSpeed;
/// <summary>
/// 投射物实体
/// </summary>
public readonly string ProjectileEntity;
public EntityConfig ProjectileEntity_Ref;
public const int __ID__ = -958250779;
public override int GetTypeId() => __ID__;
@@ -86,6 +160,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
{
PlayerEntity_Ref = tables.TbEntityConfig.GetOrDefault(PlayerEntity);
@@ -95,6 +170,19 @@ public sealed partial class GlobalConfig : Luban.BeanBase
ProjectileEntity_Ref = tables.TbEntityConfig.GetOrDefault(ProjectileEntity);
}
public override string ToString()
@@ -102,15 +190,29 @@ public sealed partial class GlobalConfig : Luban.BeanBase
return "{ "
+ "weaponCapacity:" + WeaponCapacity + ","
+ "propMaxCount:" + PropMaxCount + ","
+ "playerEntity:" + PlayerEntity + ","
+ "weaponRecycleRate:" + WeaponRecycleRate + ","
+ "shopGoodsCount:" + ShopGoodsCount + ","
+ "shopPriceRandomPercent:" + ShopPriceRandomPercent + ","
+ "shopMinPrice:" + ShopMinPrice + ","
+ "levelUpRefreshPriceBase:" + LevelUpRefreshPriceBase + ","
+ "levelUpRewardCount:" + LevelUpRewardCount + ","
+ "enemyGroupName:" + EnemyGroupName + ","
+ "spawnEnemyMaxCount:" + SpawnEnemyMaxCount + ","
+ "spawnDistanceFromPlayer:" + SpawnDistanceFromPlayer + ","
+ "enemySpawnDistanceMin:" + EnemySpawnDistanceMin + ","
+ "enemySpawnDistanceMax:" + EnemySpawnDistanceMax + ","
+ "weaponRotateSpeed:" + WeaponRotateSpeed + ","
+ "playerGroupName:" + PlayerGroupName + ","
+ "enemyGroupName:" + EnemyGroupName + ","
+ "projectileGroupName:" + ProjectileGroupName + ","
+ "dropGroupName:" + DropGroupName + ","
+ "effectGroupNmae:" + EffectGroupNmae + ","
+ "minDamage:" + MinDamage + ","
+ "maxDodgeRate:" + MaxDodgeRate + ","
+ "minSpawnRateScale:" + MinSpawnRateScale + ","
+ "projectileLifeTime:" + ProjectileLifeTime + ","
+ "projectileHeightOffset:" + ProjectileHeightOffset + ","
+ "projectileSpeed:" + ProjectileSpeed + ","
+ "projectileEntity:" + ProjectileEntity + ","
+ "}";
}
}