调整部分数据表配置,优化 SpriteCache 功能
This commit is contained in:
@@ -16,7 +16,8 @@ public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
{
|
||||
public EnemyConfig(ByteBuf _buf)
|
||||
{
|
||||
Name = _buf.ReadString();
|
||||
EnemyType = (EnemyType)_buf.ReadInt();
|
||||
LogicType = _buf.ReadString();
|
||||
MaxHealth = _buf.ReadInt();
|
||||
HpAddPerLevel = _buf.ReadInt();
|
||||
AttackDamage = _buf.ReadInt();
|
||||
@@ -38,9 +39,13 @@ public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// 敌人类型
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
public readonly EnemyType EnemyType;
|
||||
/// <summary>
|
||||
/// 逻辑类型
|
||||
/// </summary>
|
||||
public readonly string LogicType;
|
||||
/// <summary>
|
||||
/// 最大生命
|
||||
/// </summary>
|
||||
@@ -108,13 +113,15 @@ public sealed partial class EnemyConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "name:" + Name + ","
|
||||
+ "enemyType:" + EnemyType + ","
|
||||
+ "logicType:" + LogicType + ","
|
||||
+ "maxHealth:" + MaxHealth + ","
|
||||
+ "hpAddPerLevel:" + HpAddPerLevel + ","
|
||||
+ "attackDamage:" + AttackDamage + ","
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
/// <summary>
|
||||
/// 敌人类型
|
||||
/// </summary>
|
||||
public enum EnemyType : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 无
|
||||
/// </summary>
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// 近战敌人
|
||||
/// </summary>
|
||||
MeleeEnemy = 1,
|
||||
/// <summary>
|
||||
/// 远程敌人
|
||||
/// </summary>
|
||||
RemoteEnemy = 2,
|
||||
/// <summary>
|
||||
/// 蝙蝠
|
||||
/// </summary>
|
||||
BatEnemy = 3,
|
||||
/// <summary>
|
||||
/// 骷髅兵
|
||||
/// </summary>
|
||||
SkeletonEnemy = 4,
|
||||
/// <summary>
|
||||
/// 骷髅巨人
|
||||
/// </summary>
|
||||
SkeletonGiantEnemy = 5,
|
||||
/// <summary>
|
||||
/// 幽灵
|
||||
/// </summary>
|
||||
GhostEnemy = 6,
|
||||
/// <summary>
|
||||
/// 火焰法师
|
||||
/// </summary>
|
||||
FireMageEnemy = 7,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a8fa6fc84c7516d4c88f81a40a1b61ea
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -16,7 +16,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
{
|
||||
public GlobalConfig(ByteBuf _buf)
|
||||
{
|
||||
ElapsedTime = _buf.ReadInt();
|
||||
WeaponCapacity = _buf.ReadInt();
|
||||
}
|
||||
|
||||
public static GlobalConfig DeserializeGlobalConfig(ByteBuf _buf)
|
||||
@@ -24,7 +24,10 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
return new GlobalConfig(_buf);
|
||||
}
|
||||
|
||||
public readonly int ElapsedTime;
|
||||
/// <summary>
|
||||
/// 最大持有武器数量
|
||||
/// </summary>
|
||||
public readonly int WeaponCapacity;
|
||||
|
||||
public const int __ID__ = -958250779;
|
||||
public override int GetTypeId() => __ID__;
|
||||
@@ -37,7 +40,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "elapsedTime:" + ElapsedTime + ","
|
||||
+ "weaponCapacity:" + WeaponCapacity + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,9 @@ public sealed partial class GoodsConfig : Luban.BeanBase
|
||||
{
|
||||
Id = _buf.ReadInt();
|
||||
GoodsType = (GoodsType)_buf.ReadInt();
|
||||
GoodsTypeId = _buf.ReadInt();
|
||||
PropId = _buf.ReadInt();
|
||||
PropId_Ref = null;
|
||||
WeaponType = (WeaponType)_buf.ReadInt();
|
||||
}
|
||||
|
||||
public static GoodsConfig DeserializeGoodsConfig(ByteBuf _buf)
|
||||
@@ -35,9 +37,14 @@ public sealed partial class GoodsConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly GoodsType GoodsType;
|
||||
/// <summary>
|
||||
/// 商品对应物品Id
|
||||
/// 道具商品Id
|
||||
/// </summary>
|
||||
public readonly int GoodsTypeId;
|
||||
public readonly int PropId;
|
||||
public PropConfig PropId_Ref;
|
||||
/// <summary>
|
||||
/// 武器商品类型
|
||||
/// </summary>
|
||||
public readonly WeaponType WeaponType;
|
||||
|
||||
public const int __ID__ = 1358452248;
|
||||
public override int GetTypeId() => __ID__;
|
||||
@@ -46,15 +53,17 @@ public sealed partial class GoodsConfig : Luban.BeanBase
|
||||
{
|
||||
|
||||
|
||||
PropId_Ref = tables.TbPropConfig.GetOrDefault(PropId);
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "Id:" + Id + ","
|
||||
+ "GoodsType:" + GoodsType + ","
|
||||
+ "GoodsTypeId:" + GoodsTypeId + ","
|
||||
+ "id:" + Id + ","
|
||||
+ "goodsType:" + GoodsType + ","
|
||||
+ "propId:" + PropId + ","
|
||||
+ "weaponType:" + WeaponType + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
Title = _buf.ReadString();
|
||||
Rarity = (Rarity)_buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
||||
Sprite = _buf.ReadString();
|
||||
Sprite_Ref = null;
|
||||
}
|
||||
|
||||
public static LevelUpRewardConfig DeserializeLevelUpRewardConfig(ByteBuf _buf)
|
||||
@@ -40,6 +42,11 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly Rarity Rarity;
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
public readonly string Sprite;
|
||||
public SpriteConfig Sprite_Ref;
|
||||
|
||||
public const int __ID__ = 1603299856;
|
||||
public override int GetTypeId() => __ID__;
|
||||
@@ -50,6 +57,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -59,6 +67,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
+ "title:" + Title + ","
|
||||
+ "rarity:" + Rarity + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,8 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
Rarity = (Rarity)_buf.ReadInt();
|
||||
Price = _buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
||||
Sprite = _buf.ReadString();
|
||||
Sprite_Ref = null;
|
||||
}
|
||||
|
||||
public static PropConfig DeserializePropConfig(ByteBuf _buf)
|
||||
@@ -45,6 +47,11 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly int Price;
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
public readonly string Sprite;
|
||||
public SpriteConfig Sprite_Ref;
|
||||
|
||||
public const int __ID__ = 91068581;
|
||||
public override int GetTypeId() => __ID__;
|
||||
@@ -56,6 +63,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -66,6 +74,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
+ "rarity:" + Rarity + ","
|
||||
+ "price:" + Price + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
{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)
|
||||
@@ -42,6 +44,8 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
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__;
|
||||
@@ -55,6 +59,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -67,6 +72,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "initialItems:" + Luban.StringUtil.CollectionToString(InitialItems) + ","
|
||||
+ "prefab:" + Prefab + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,12 @@ namespace SepCore.Definition
|
||||
/// </summary>
|
||||
public partial class TbEnemyConfig
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<string, EnemyConfig> _dataMap;
|
||||
private readonly System.Collections.Generic.Dictionary<EnemyType, EnemyConfig> _dataMap;
|
||||
private readonly System.Collections.Generic.List<EnemyConfig> _dataList;
|
||||
|
||||
public TbEnemyConfig(ByteBuf _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<string, EnemyConfig>();
|
||||
_dataMap = new System.Collections.Generic.Dictionary<EnemyType, EnemyConfig>();
|
||||
_dataList = new System.Collections.Generic.List<EnemyConfig>();
|
||||
|
||||
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
||||
@@ -30,16 +30,16 @@ public partial class TbEnemyConfig
|
||||
EnemyConfig _v;
|
||||
_v = EnemyConfig.DeserializeEnemyConfig(_buf);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Name, _v);
|
||||
_dataMap.Add(_v.EnemyType, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<string, EnemyConfig> DataMap => _dataMap;
|
||||
public System.Collections.Generic.Dictionary<EnemyType, EnemyConfig> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<EnemyConfig> DataList => _dataList;
|
||||
|
||||
public EnemyConfig GetOrDefault(string key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public EnemyConfig Get(string key) => _dataMap[key];
|
||||
public EnemyConfig this[string key] => _dataMap[key];
|
||||
public EnemyConfig GetOrDefault(EnemyType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public EnemyConfig Get(EnemyType key) => _dataMap[key];
|
||||
public EnemyConfig this[EnemyType key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,10 @@ public partial class TbGlobalConfig
|
||||
}
|
||||
|
||||
|
||||
public int ElapsedTime => _data.ElapsedTime;
|
||||
/// <summary>
|
||||
/// 最大持有武器数量
|
||||
/// </summary>
|
||||
public int WeaponCapacity => _data.WeaponCapacity;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
@@ -17,12 +17,12 @@ namespace SepCore.Definition
|
||||
/// </summary>
|
||||
public partial class TbWeaponConfig
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<int, WeaponConfig> _dataMap;
|
||||
private readonly System.Collections.Generic.Dictionary<WeaponType, WeaponConfig> _dataMap;
|
||||
private readonly System.Collections.Generic.List<WeaponConfig> _dataList;
|
||||
|
||||
public TbWeaponConfig(ByteBuf _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<int, WeaponConfig>();
|
||||
_dataMap = new System.Collections.Generic.Dictionary<WeaponType, WeaponConfig>();
|
||||
_dataList = new System.Collections.Generic.List<WeaponConfig>();
|
||||
|
||||
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
||||
@@ -30,16 +30,16 @@ public partial class TbWeaponConfig
|
||||
WeaponConfig _v;
|
||||
_v = WeaponConfig.DeserializeWeaponConfig(_buf);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.Id, _v);
|
||||
_dataMap.Add(_v.WeaponType, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<int, WeaponConfig> DataMap => _dataMap;
|
||||
public System.Collections.Generic.Dictionary<WeaponType, WeaponConfig> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<WeaponConfig> DataList => _dataList;
|
||||
|
||||
public WeaponConfig GetOrDefault(int key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public WeaponConfig Get(int key) => _dataMap[key];
|
||||
public WeaponConfig this[int key] => _dataMap[key];
|
||||
public WeaponConfig GetOrDefault(WeaponType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public WeaponConfig Get(WeaponType key) => _dataMap[key];
|
||||
public WeaponConfig this[WeaponType key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
@@ -16,8 +16,8 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
{
|
||||
public WeaponConfig(ByteBuf _buf)
|
||||
{
|
||||
Id = _buf.ReadInt();
|
||||
Name = _buf.ReadString();
|
||||
WeaponType = (WeaponType)_buf.ReadInt();
|
||||
LogicType = _buf.ReadString();
|
||||
Rarity = (Rarity)_buf.ReadInt();
|
||||
Price = _buf.ReadInt();
|
||||
Attack = _buf.ReadInt();
|
||||
@@ -28,6 +28,8 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Modifiers = new System.Collections.Generic.List<modifier>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { modifier _e0; _e0 = modifier.Deserializemodifier(_buf); Modifiers.Add(_e0);}}
|
||||
Prefab = _buf.ReadString();
|
||||
Prefab_Ref = null;
|
||||
Sprite = _buf.ReadString();
|
||||
Sprite_Ref = null;
|
||||
}
|
||||
|
||||
public static WeaponConfig DeserializeWeaponConfig(ByteBuf _buf)
|
||||
@@ -36,13 +38,13 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 武器id
|
||||
/// 武器类型
|
||||
/// </summary>
|
||||
public readonly int Id;
|
||||
public readonly WeaponType WeaponType;
|
||||
/// <summary>
|
||||
/// 武器名
|
||||
/// 逻辑类型
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
public readonly string LogicType;
|
||||
/// <summary>
|
||||
/// 道具品质
|
||||
/// </summary>
|
||||
@@ -77,6 +79,11 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly string Prefab;
|
||||
public EntityConfig Prefab_Ref;
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
public readonly string Sprite;
|
||||
public SpriteConfig Sprite_Ref;
|
||||
|
||||
public const int __ID__ = 127041694;
|
||||
public override int GetTypeId() => __ID__;
|
||||
@@ -94,13 +101,14 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "id:" + Id + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "weaponType:" + WeaponType + ","
|
||||
+ "logicType:" + LogicType + ","
|
||||
+ "rarity:" + Rarity + ","
|
||||
+ "price:" + Price + ","
|
||||
+ "attack:" + Attack + ","
|
||||
@@ -110,6 +118,7 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
+ "parameters:" + Luban.StringUtil.CollectionToString(Parameters) + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "prefab:" + Prefab + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
/// <summary>
|
||||
/// 武器类型
|
||||
/// </summary>
|
||||
public enum WeaponType : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 无
|
||||
/// </summary>
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// 小刀
|
||||
/// </summary>
|
||||
Knife = 1,
|
||||
/// <summary>
|
||||
/// 手枪
|
||||
/// </summary>
|
||||
Handgun = 2,
|
||||
/// <summary>
|
||||
/// 斧头
|
||||
/// </summary>
|
||||
Axe = 3,
|
||||
/// <summary>
|
||||
/// 闪电
|
||||
/// </summary>
|
||||
Lightning = 4,
|
||||
/// <summary>
|
||||
/// 长枪
|
||||
/// </summary>
|
||||
Lance = 5,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 98dbb9ae443a07e4284d96741de14f3d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -19,8 +19,7 @@ public sealed partial class enemySpawnConfig : Luban.BeanBase
|
||||
{
|
||||
public enemySpawnConfig(ByteBuf _buf)
|
||||
{
|
||||
EnemyName = _buf.ReadString();
|
||||
EnemyName_Ref = null;
|
||||
EnemyType = (EnemyType)_buf.ReadInt();
|
||||
EnemyCount = _buf.ReadInt();
|
||||
Interval = _buf.ReadInt();
|
||||
}
|
||||
@@ -33,8 +32,7 @@ public sealed partial class enemySpawnConfig : Luban.BeanBase
|
||||
/// <summary>
|
||||
/// 要出的怪名
|
||||
/// </summary>
|
||||
public readonly string EnemyName;
|
||||
public EnemyConfig EnemyName_Ref;
|
||||
public readonly EnemyType EnemyType;
|
||||
/// <summary>
|
||||
/// 一次出的数量
|
||||
/// </summary>
|
||||
@@ -49,7 +47,7 @@ public sealed partial class enemySpawnConfig : Luban.BeanBase
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
EnemyName_Ref = tables.TbEnemyConfig.GetOrDefault(EnemyName);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -57,7 +55,7 @@ public sealed partial class enemySpawnConfig : Luban.BeanBase
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "enemyName:" + EnemyName + ","
|
||||
+ "enemyType:" + EnemyType + ","
|
||||
+ "enemyCount:" + EnemyCount + ","
|
||||
+ "interval:" + Interval + ","
|
||||
+ "}";
|
||||
|
||||
Reference in New Issue
Block a user