引入属性、伤害管线
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
[System.Flags]
|
||||
public enum DamageType : int
|
||||
{
|
||||
/// <summary>
|
||||
/// 无
|
||||
/// </summary>
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// 近战伤害
|
||||
/// </summary>
|
||||
Melee = 1,
|
||||
/// <summary>
|
||||
/// 远程伤害
|
||||
/// </summary>
|
||||
Ranged = 2,
|
||||
/// <summary>
|
||||
/// 元素伤害
|
||||
/// </summary>
|
||||
Element = 4,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 178341689d25049458e8460d398db2dc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -33,6 +33,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
EnemySpawnDistanceMin = _buf.ReadInt();
|
||||
EnemySpawnDistanceMax = _buf.ReadInt();
|
||||
WeaponRotateSpeed = _buf.ReadInt();
|
||||
WeaponBaseCrit = _buf.ReadFloat();
|
||||
PlayerGroupName = _buf.ReadString();
|
||||
EnemyGroupName = _buf.ReadString();
|
||||
ProjectileGroupName = _buf.ReadString();
|
||||
@@ -48,6 +49,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
ProjectileEntity_Ref = null;
|
||||
DamageTextYOffset = _buf.ReadInt();
|
||||
EntityAsyncTimeout = _buf.ReadInt();
|
||||
CritMultiplier = _buf.ReadFloat();
|
||||
EnemyBodyRadius = _buf.ReadInt();
|
||||
EnemySeparationIterations = _buf.ReadInt();
|
||||
}
|
||||
@@ -123,6 +125,10 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly int WeaponRotateSpeed;
|
||||
/// <summary>
|
||||
/// 武器基本暴击率
|
||||
/// </summary>
|
||||
public readonly float WeaponBaseCrit;
|
||||
/// <summary>
|
||||
/// 玩家对象组名
|
||||
/// </summary>
|
||||
public readonly string PlayerGroupName;
|
||||
@@ -180,6 +186,10 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly int EntityAsyncTimeout;
|
||||
/// <summary>
|
||||
/// 暴击伤害倍率
|
||||
/// </summary>
|
||||
public readonly float CritMultiplier;
|
||||
/// <summary>
|
||||
/// 敌人碰撞半径
|
||||
/// </summary>
|
||||
public readonly int EnemyBodyRadius;
|
||||
@@ -218,6 +228,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ProjectileEntity_Ref = tables.TbEntityConfig.GetOrDefault(ProjectileEntity);
|
||||
@@ -225,6 +236,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
@@ -246,6 +258,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
+ "enemySpawnDistanceMin:" + EnemySpawnDistanceMin + ","
|
||||
+ "enemySpawnDistanceMax:" + EnemySpawnDistanceMax + ","
|
||||
+ "weaponRotateSpeed:" + WeaponRotateSpeed + ","
|
||||
+ "weaponBaseCrit:" + WeaponBaseCrit + ","
|
||||
+ "playerGroupName:" + PlayerGroupName + ","
|
||||
+ "enemyGroupName:" + EnemyGroupName + ","
|
||||
+ "projectileGroupName:" + ProjectileGroupName + ","
|
||||
@@ -260,6 +273,7 @@ public sealed partial class GlobalConfig : Luban.BeanBase
|
||||
+ "projectileEntity:" + ProjectileEntity + ","
|
||||
+ "damageTextYOffset:" + DamageTextYOffset + ","
|
||||
+ "entityAsyncTimeout:" + EntityAsyncTimeout + ","
|
||||
+ "critMultiplier:" + CritMultiplier + ","
|
||||
+ "enemyBodyRadius:" + EnemyBodyRadius + ","
|
||||
+ "enemySeparationIterations:" + EnemySeparationIterations + ","
|
||||
+ "}";
|
||||
|
||||
@@ -17,7 +17,7 @@ public sealed partial class LevelConfig : Luban.BeanBase
|
||||
public LevelConfig(ByteBuf _buf)
|
||||
{
|
||||
Id = _buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);EnemySpawnConfigs = new System.Collections.Generic.List<enemySpawnConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { enemySpawnConfig _e0; _e0 = enemySpawnConfig.DeserializeenemySpawnConfig(_buf); EnemySpawnConfigs.Add(_e0);}}
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);EnemySpawnConfigs = new System.Collections.Generic.List<EnemySpawnConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { EnemySpawnConfig _e0; _e0 = EnemySpawnConfig.DeserializeEnemySpawnConfig(_buf); EnemySpawnConfigs.Add(_e0);}}
|
||||
Duration = _buf.ReadInt();
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public sealed partial class LevelConfig : Luban.BeanBase
|
||||
/// 关卡id
|
||||
/// </summary>
|
||||
public readonly int Id;
|
||||
public readonly System.Collections.Generic.List<enemySpawnConfig> EnemySpawnConfigs;
|
||||
public readonly System.Collections.Generic.List<EnemySpawnConfig> EnemySpawnConfigs;
|
||||
/// <summary>
|
||||
/// 关卡时间
|
||||
/// </summary>
|
||||
|
||||
@@ -19,7 +19,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
Id = _buf.ReadInt();
|
||||
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);}}
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||
Sprite = _buf.ReadString();
|
||||
Sprite_Ref = null;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
/// 道具品质
|
||||
/// </summary>
|
||||
public readonly Rarity Rarity;
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
@@ -56,7 +56,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public sealed partial class LevelUpRewardConfig : Luban.BeanBase
|
||||
+ "id:" + Id + ","
|
||||
+ "title:" + Title + ","
|
||||
+ "rarity:" + Rarity + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 ModifierType : int
|
||||
{
|
||||
/// <summary>
|
||||
/// 无
|
||||
/// </summary>
|
||||
None = 0,
|
||||
/// <summary>
|
||||
/// 固定值
|
||||
/// </summary>
|
||||
Flat = 100,
|
||||
/// <summary>
|
||||
/// 百分比累加
|
||||
/// </summary>
|
||||
PercentAdd = 200,
|
||||
/// <summary>
|
||||
/// 最终百分比独立乘区
|
||||
/// </summary>
|
||||
PercentMult = 300,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a95015722b22de41a817f1d17e7d560
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -20,7 +20,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
Name = _buf.ReadString();
|
||||
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);}}
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||
Sprite = _buf.ReadString();
|
||||
Sprite_Ref = null;
|
||||
}
|
||||
@@ -46,7 +46,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
/// 道具价格
|
||||
/// </summary>
|
||||
public readonly int Price;
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||
/// <summary>
|
||||
/// 图标
|
||||
/// </summary>
|
||||
@@ -62,7 +62,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public sealed partial class PropConfig : Luban.BeanBase
|
||||
+ "name:" + Name + ","
|
||||
+ "rarity:" + Rarity + ","
|
||||
+ "price:" + Price + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
+ "}";
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
MaxHealth = _buf.ReadInt();
|
||||
Speed = _buf.ReadFloat();
|
||||
Coin = _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);}}
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||
{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;
|
||||
@@ -38,9 +38,9 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
public readonly float Speed;
|
||||
public readonly int Coin;
|
||||
/// <summary>
|
||||
/// key
|
||||
/// statType
|
||||
/// </summary>
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||
public readonly System.Collections.Generic.List<int> InitialItems;
|
||||
public readonly string Prefab;
|
||||
public EntityConfig Prefab_Ref;
|
||||
@@ -56,7 +56,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
@@ -69,7 +69,7 @@ public sealed partial class RoleConfig : Luban.BeanBase
|
||||
+ "maxHealth:" + MaxHealth + ","
|
||||
+ "speed:" + Speed + ","
|
||||
+ "coin:" + Coin + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||
+ "initialItems:" + Luban.StringUtil.CollectionToString(InitialItems) + ","
|
||||
+ "prefab:" + Prefab + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 StatConfig : Luban.BeanBase
|
||||
{
|
||||
public StatConfig(ByteBuf _buf)
|
||||
{
|
||||
StatType = (StatType)_buf.ReadInt();
|
||||
Name = _buf.ReadString();
|
||||
DefaultBaseValue = _buf.ReadFloat();
|
||||
HasMin = _buf.ReadBool();
|
||||
MinValue = _buf.ReadFloat();
|
||||
HasMax = _buf.ReadBool();
|
||||
MaxValue = _buf.ReadFloat();
|
||||
IsPercentDisplay = _buf.ReadBool();
|
||||
}
|
||||
|
||||
public static StatConfig DeserializeStatConfig(ByteBuf _buf)
|
||||
{
|
||||
return new StatConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 属性类型
|
||||
/// </summary>
|
||||
public readonly StatType StatType;
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public readonly string Name;
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
public readonly float DefaultBaseValue;
|
||||
/// <summary>
|
||||
/// 是否有最小值
|
||||
/// </summary>
|
||||
public readonly bool HasMin;
|
||||
/// <summary>
|
||||
/// 最小值
|
||||
/// </summary>
|
||||
public readonly float MinValue;
|
||||
/// <summary>
|
||||
/// 是否有最大值
|
||||
/// </summary>
|
||||
public readonly bool HasMax;
|
||||
/// <summary>
|
||||
/// 最大值
|
||||
/// </summary>
|
||||
public readonly float MaxValue;
|
||||
/// <summary>
|
||||
/// UI 文本是否百分比
|
||||
/// </summary>
|
||||
public readonly bool IsPercentDisplay;
|
||||
|
||||
public const int __ID__ = 807092950;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "statType:" + StatType + ","
|
||||
+ "name:" + Name + ","
|
||||
+ "defaultBaseValue:" + DefaultBaseValue + ","
|
||||
+ "hasMin:" + HasMin + ","
|
||||
+ "minValue:" + MinValue + ","
|
||||
+ "hasMax:" + HasMax + ","
|
||||
+ "maxValue:" + MaxValue + ","
|
||||
+ "isPercentDisplay:" + IsPercentDisplay + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2dfe101008e1ded4ea35681a5a656d2f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+14
-14
@@ -15,34 +15,34 @@ namespace SepCore.Definition
|
||||
/// <summary>
|
||||
/// 修饰器
|
||||
/// </summary>
|
||||
public sealed partial class modifier : Luban.BeanBase
|
||||
public sealed partial class StatModifierConfig : Luban.BeanBase
|
||||
{
|
||||
public modifier(ByteBuf _buf)
|
||||
public StatModifierConfig(ByteBuf _buf)
|
||||
{
|
||||
Key = (StatType)_buf.ReadInt();
|
||||
Value = _buf.ReadInt();
|
||||
IsPercent = _buf.ReadBool();
|
||||
StatType = (StatType)_buf.ReadInt();
|
||||
Value = _buf.ReadFloat();
|
||||
ModifierType = (ModifierType)_buf.ReadInt();
|
||||
}
|
||||
|
||||
public static modifier Deserializemodifier(ByteBuf _buf)
|
||||
public static StatModifierConfig DeserializeStatModifierConfig(ByteBuf _buf)
|
||||
{
|
||||
return new modifier(_buf);
|
||||
return new StatModifierConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 属性类型
|
||||
/// </summary>
|
||||
public readonly StatType Key;
|
||||
public readonly StatType StatType;
|
||||
/// <summary>
|
||||
/// 值
|
||||
/// </summary>
|
||||
public readonly int Value;
|
||||
public readonly float Value;
|
||||
/// <summary>
|
||||
/// 是否为百分比
|
||||
/// 修饰器类型
|
||||
/// </summary>
|
||||
public readonly bool IsPercent;
|
||||
public readonly ModifierType ModifierType;
|
||||
|
||||
public const int __ID__ = -615513385;
|
||||
public const int __ID__ = 235118733;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
@@ -55,9 +55,9 @@ public sealed partial class modifier : Luban.BeanBase
|
||||
public override string ToString()
|
||||
{
|
||||
return "{ "
|
||||
+ "key:" + Key + ","
|
||||
+ "statType:" + StatType + ","
|
||||
+ "value:" + Value + ","
|
||||
+ "isPercent:" + IsPercent + ","
|
||||
+ "modifierType:" + ModifierType + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
@@ -23,39 +23,67 @@ namespace SepCore.Definition
|
||||
/// <summary>
|
||||
/// 最大生命
|
||||
/// </summary>
|
||||
MaxHealth = 1,
|
||||
MaxHp = 1,
|
||||
/// <summary>
|
||||
/// 移动速度
|
||||
/// 生命恢复
|
||||
/// </summary>
|
||||
MovementSpeed = 2,
|
||||
HpRegen = 2,
|
||||
/// <summary>
|
||||
/// 攻击力
|
||||
/// 生命窃取
|
||||
/// </summary>
|
||||
Attack = 3,
|
||||
LifeSteal = 3,
|
||||
/// <summary>
|
||||
/// 防御力
|
||||
/// 伤害
|
||||
/// </summary>
|
||||
Defense = 4,
|
||||
DamagePercent = 4,
|
||||
/// <summary>
|
||||
/// 近战伤害
|
||||
/// </summary>
|
||||
MeleeDamage = 5,
|
||||
/// <summary>
|
||||
/// 远程伤害
|
||||
/// </summary>
|
||||
RangedDamage = 6,
|
||||
/// <summary>
|
||||
/// 元素伤害
|
||||
/// </summary>
|
||||
ElementalDamage = 7,
|
||||
/// <summary>
|
||||
/// 攻击速度
|
||||
/// </summary>
|
||||
AttackSpeed = 5,
|
||||
AttackSpeed = 8,
|
||||
/// <summary>
|
||||
/// 暴击率
|
||||
/// </summary>
|
||||
Critical = 6,
|
||||
CritChance = 9,
|
||||
/// <summary>
|
||||
/// 暴击伤害
|
||||
/// 工程学
|
||||
/// </summary>
|
||||
CriticalDamage = 7,
|
||||
Engineering = 10,
|
||||
/// <summary>
|
||||
/// 攻击范围
|
||||
/// </summary>
|
||||
Range = 11,
|
||||
/// <summary>
|
||||
/// 护甲
|
||||
/// </summary>
|
||||
Armor = 12,
|
||||
/// <summary>
|
||||
/// 闪避率
|
||||
/// </summary>
|
||||
Dodge = 8,
|
||||
Dodge = 13,
|
||||
/// <summary>
|
||||
/// 自动吸收范围
|
||||
/// 移动速度
|
||||
/// </summary>
|
||||
AbsorbRange = 9,
|
||||
MoveSpeed = 14,
|
||||
/// <summary>
|
||||
/// 收获
|
||||
/// </summary>
|
||||
Harvesting = 15,
|
||||
/// <summary>
|
||||
/// 幸运
|
||||
/// </summary>
|
||||
Luck = 16,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,6 +61,10 @@ public partial class Tables
|
||||
/// 界面配置
|
||||
/// </summary>
|
||||
public TbWeaponConfig TbWeaponConfig {get; }
|
||||
/// <summary>
|
||||
/// 角色属性配置
|
||||
/// </summary>
|
||||
public TbStatConfig TbStatConfig {get; }
|
||||
|
||||
public Tables(System.Func<string, ByteBuf> loader)
|
||||
{
|
||||
@@ -82,6 +86,7 @@ public partial class Tables
|
||||
TbUIFormConfig = new TbUIFormConfig(loader("tbuiformconfig"));
|
||||
TbUISoundConfig = new TbUISoundConfig(loader("tbuisoundconfig"));
|
||||
TbWeaponConfig = new TbWeaponConfig(loader("tbweaponconfig"));
|
||||
TbStatConfig = new TbStatConfig(loader("tbstatconfig"));
|
||||
ResolveRef();
|
||||
}
|
||||
|
||||
@@ -105,6 +110,7 @@ public partial class Tables
|
||||
TbUIFormConfig.ResolveRef(this);
|
||||
TbUISoundConfig.ResolveRef(this);
|
||||
TbWeaponConfig.ResolveRef(this);
|
||||
TbStatConfig.ResolveRef(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,10 @@ public partial class TbGlobalConfig
|
||||
/// </summary>
|
||||
public int WeaponRotateSpeed => _data.WeaponRotateSpeed;
|
||||
/// <summary>
|
||||
/// 武器基本暴击率
|
||||
/// </summary>
|
||||
public float WeaponBaseCrit => _data.WeaponBaseCrit;
|
||||
/// <summary>
|
||||
/// 玩家对象组名
|
||||
/// </summary>
|
||||
public string PlayerGroupName => _data.PlayerGroupName;
|
||||
@@ -151,6 +155,10 @@ public partial class TbGlobalConfig
|
||||
/// </summary>
|
||||
public int EntityAsyncTimeout => _data.EntityAsyncTimeout;
|
||||
/// <summary>
|
||||
/// 暴击伤害倍率
|
||||
/// </summary>
|
||||
public float CritMultiplier => _data.CritMultiplier;
|
||||
/// <summary>
|
||||
/// 敌人碰撞半径
|
||||
/// </summary>
|
||||
public int EnemyBodyRadius => _data.EnemyBodyRadius;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// <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
|
||||
{
|
||||
/// <summary>
|
||||
/// 角色属性配置
|
||||
/// </summary>
|
||||
public partial class TbStatConfig
|
||||
{
|
||||
private readonly System.Collections.Generic.Dictionary<StatType, StatConfig> _dataMap;
|
||||
private readonly System.Collections.Generic.List<StatConfig> _dataList;
|
||||
|
||||
public TbStatConfig(ByteBuf _buf)
|
||||
{
|
||||
_dataMap = new System.Collections.Generic.Dictionary<StatType, StatConfig>();
|
||||
_dataList = new System.Collections.Generic.List<StatConfig>();
|
||||
|
||||
for(int n = _buf.ReadSize() ; n > 0 ; --n)
|
||||
{
|
||||
StatConfig _v;
|
||||
_v = StatConfig.DeserializeStatConfig(_buf);
|
||||
_dataList.Add(_v);
|
||||
_dataMap.Add(_v.StatType, _v);
|
||||
}
|
||||
}
|
||||
|
||||
public System.Collections.Generic.Dictionary<StatType, StatConfig> DataMap => _dataMap;
|
||||
public System.Collections.Generic.List<StatConfig> DataList => _dataList;
|
||||
|
||||
public StatConfig GetOrDefault(StatType key) => _dataMap.TryGetValue(key, out var v) ? v : null;
|
||||
public StatConfig Get(StatType key) => _dataMap[key];
|
||||
public StatConfig this[StatType key] => _dataMap[key];
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
{
|
||||
foreach(var _v in _dataList)
|
||||
{
|
||||
_v.ResolveRef(tables);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 54c58e47ce828d246ae57a00a9704563
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -22,10 +22,11 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
Price = _buf.ReadInt();
|
||||
Attack = _buf.ReadInt();
|
||||
Cooldown = _buf.ReadInt();
|
||||
DamageType = (DamageType)_buf.ReadInt();
|
||||
AttackRange = _buf.ReadInt();
|
||||
AttackSoundId = _buf.ReadInt();
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);Parameters = new System.Collections.Generic.Dictionary<ParamType, int>(n0 * 3 / 2);for(var i0 = 0 ; i0 < n0 ; i0++) { ParamType _k0; _k0 = (ParamType)_buf.ReadInt(); int _v0; _v0 = _buf.ReadInt(); Parameters.Add(_k0, _v0);}}
|
||||
{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);}}
|
||||
{int n0 = System.Math.Min(_buf.ReadSize(), _buf.Size);StatModifierConfigs = new System.Collections.Generic.List<StatModifierConfig>(n0);for(var i0 = 0 ; i0 < n0 ; i0++) { StatModifierConfig _e0; _e0 = StatModifierConfig.DeserializeStatModifierConfig(_buf); StatModifierConfigs.Add(_e0);}}
|
||||
Prefab = _buf.ReadString();
|
||||
Prefab_Ref = null;
|
||||
Sprite = _buf.ReadString();
|
||||
@@ -62,6 +63,10 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly int Cooldown;
|
||||
/// <summary>
|
||||
/// 伤害类型
|
||||
/// </summary>
|
||||
public readonly DamageType DamageType;
|
||||
/// <summary>
|
||||
/// 攻击范围
|
||||
/// </summary>
|
||||
public readonly int AttackRange;
|
||||
@@ -73,7 +78,7 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
/// 参数类型
|
||||
/// </summary>
|
||||
public readonly System.Collections.Generic.Dictionary<ParamType, int> Parameters;
|
||||
public readonly System.Collections.Generic.List<modifier> Modifiers;
|
||||
public readonly System.Collections.Generic.List<StatModifierConfig> StatModifierConfigs;
|
||||
/// <summary>
|
||||
/// 预制体
|
||||
/// </summary>
|
||||
@@ -99,7 +104,8 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
|
||||
|
||||
|
||||
foreach (var _e in Modifiers) { _e?.ResolveRef(tables); }
|
||||
|
||||
foreach (var _e in StatModifierConfigs) { _e?.ResolveRef(tables); }
|
||||
Prefab_Ref = tables.TbEntityConfig.GetOrDefault(Prefab);
|
||||
Sprite_Ref = tables.TbSpriteConfig.GetOrDefault(Sprite);
|
||||
}
|
||||
@@ -113,10 +119,11 @@ public sealed partial class WeaponConfig : Luban.BeanBase
|
||||
+ "price:" + Price + ","
|
||||
+ "attack:" + Attack + ","
|
||||
+ "cooldown:" + Cooldown + ","
|
||||
+ "damageType:" + DamageType + ","
|
||||
+ "attackRange:" + AttackRange + ","
|
||||
+ "attackSoundId:" + AttackSoundId + ","
|
||||
+ "parameters:" + Luban.StringUtil.CollectionToString(Parameters) + ","
|
||||
+ "modifiers:" + Luban.StringUtil.CollectionToString(Modifiers) + ","
|
||||
+ "statModifierConfigs:" + Luban.StringUtil.CollectionToString(StatModifierConfigs) + ","
|
||||
+ "prefab:" + Prefab + ","
|
||||
+ "sprite:" + Sprite + ","
|
||||
+ "}";
|
||||
|
||||
@@ -15,18 +15,18 @@ namespace SepCore.Definition
|
||||
/// <summary>
|
||||
/// 出怪配置
|
||||
/// </summary>
|
||||
public sealed partial class enemySpawnConfig : Luban.BeanBase
|
||||
public sealed partial class EnemySpawnConfig : Luban.BeanBase
|
||||
{
|
||||
public enemySpawnConfig(ByteBuf _buf)
|
||||
public EnemySpawnConfig(ByteBuf _buf)
|
||||
{
|
||||
EnemyType = (EnemyType)_buf.ReadInt();
|
||||
EnemyCount = _buf.ReadInt();
|
||||
Interval = _buf.ReadInt();
|
||||
}
|
||||
|
||||
public static enemySpawnConfig DeserializeenemySpawnConfig(ByteBuf _buf)
|
||||
public static EnemySpawnConfig DeserializeEnemySpawnConfig(ByteBuf _buf)
|
||||
{
|
||||
return new enemySpawnConfig(_buf);
|
||||
return new EnemySpawnConfig(_buf);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -42,7 +42,7 @@ public sealed partial class enemySpawnConfig : Luban.BeanBase
|
||||
/// </summary>
|
||||
public readonly int Interval;
|
||||
|
||||
public const int __ID__ = -1182208523;
|
||||
public const int __ID__ = -2024984043;
|
||||
public override int GetTypeId() => __ID__;
|
||||
|
||||
public void ResolveRef(Tables tables)
|
||||
|
||||
Reference in New Issue
Block a user