引入属性、伤害管线
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public static class DamageTypeExtensions
|
||||
{
|
||||
public static StatType ToScalingStat(this DamageType damageType)
|
||||
{
|
||||
switch (damageType)
|
||||
{
|
||||
case DamageType.Melee:
|
||||
return StatType.MeleeDamage;
|
||||
case DamageType.Ranged:
|
||||
return StatType.RangedDamage;
|
||||
case DamageType.Element:
|
||||
return StatType.ElementalDamage;
|
||||
default:
|
||||
return StatType.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e6128fa910e4a778c187123490b4119
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
/// <summary>
|
||||
/// 属性查询接口。
|
||||
/// 供战斗碰撞(ImpactData)与伤害管线解耦读取属性值。
|
||||
/// </summary>
|
||||
public interface IAttributeProvider
|
||||
{
|
||||
float GetValue(StatType statType);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b483f12479014631bb5914285260aa31
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,37 +1,45 @@
|
||||
//------------------------------------------------------------
|
||||
// Game Framework
|
||||
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
|
||||
// Homepage: https://gameframework.cn/
|
||||
// Feedback: mailto:ellan@gameframework.cn
|
||||
//------------------------------------------------------------
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
using SepCore.Definition;
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
[StructLayout(LayoutKind.Auto)]
|
||||
public struct ImpactData
|
||||
{
|
||||
public ImpactData(CampType camp /*, int health*/, int attackBase, StatProperty attackStat = null,
|
||||
StatProperty defenseStat = null, StatProperty dodgeStat = null)
|
||||
{
|
||||
Camp = camp;
|
||||
//Health = health;
|
||||
AttackBase = attackBase;
|
||||
AttackStat = attackStat;
|
||||
DefenseStat = defenseStat;
|
||||
DodgeStat = dodgeStat;
|
||||
}
|
||||
|
||||
public CampType Camp { get; }
|
||||
|
||||
public int AttackBase { get; }
|
||||
|
||||
public StatProperty AttackStat { get; }
|
||||
public DamageType DamageType { get; }
|
||||
|
||||
public StatProperty DefenseStat { get; }
|
||||
public float ScalingRatio { get; }
|
||||
|
||||
public StatProperty DodgeStat { get; }
|
||||
public float BaseCritChance { get; }
|
||||
|
||||
public float CritMultiplier { get; }
|
||||
|
||||
public IAttributeProvider AttributeProvider { get; }
|
||||
|
||||
public ImpactData(
|
||||
CampType camp,
|
||||
int attackBase,
|
||||
IAttributeProvider attributeProvider = null,
|
||||
DamageType damageType = DamageType.None,
|
||||
float scalingRatio = 1.0f,
|
||||
float baseCritChance = 0f,
|
||||
float critMultiplier = 0f)
|
||||
{
|
||||
Camp = camp;
|
||||
AttackBase = attackBase;
|
||||
AttributeProvider = attributeProvider;
|
||||
DamageType = damageType;
|
||||
ScalingRatio = scalingRatio;
|
||||
BaseCritChance = baseCritChance;
|
||||
CritMultiplier = critMultiplier;
|
||||
}
|
||||
|
||||
public ImpactData(CampType camp, int attackBase)
|
||||
: this(camp, attackBase, null, DamageType.None, 1.0f, 0f, 0f)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,24 +4,24 @@ namespace SepCore.Definition
|
||||
{
|
||||
public class PropItem
|
||||
{
|
||||
private readonly List<modifier> _modifiers = new();
|
||||
private readonly List<StatModifierConfig> _modifiers = new();
|
||||
public string Title { get; private set; }
|
||||
public string IconAssetName { get; private set; }
|
||||
public Rarity Rarity { get; private set; }
|
||||
public IReadOnlyList<modifier> Modifiers => _modifiers;
|
||||
public IReadOnlyList<StatModifierConfig> Modifiers => _modifiers;
|
||||
|
||||
public PropItem(PropConfig prop)
|
||||
{
|
||||
if (prop.Modifiers != null)
|
||||
if (prop.StatModifierConfigs != null)
|
||||
{
|
||||
_modifiers.AddRange(prop.Modifiers);
|
||||
_modifiers.AddRange(prop.StatModifierConfigs);
|
||||
}
|
||||
Title = prop.Name;
|
||||
Rarity = prop.Rarity;
|
||||
IconAssetName = prop.Sprite;
|
||||
}
|
||||
|
||||
public PropItem(IEnumerable<modifier> modifiers)
|
||||
public PropItem(IEnumerable<StatModifierConfig> modifiers)
|
||||
{
|
||||
if (modifiers != null)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ namespace SepCore.Definition
|
||||
}
|
||||
}
|
||||
|
||||
public PropItem(IEnumerable<modifier> modifiers, Rarity rarity, string title, string iconAssetName)
|
||||
public PropItem(IEnumerable<StatModifierConfig> modifiers, Rarity rarity, string title, string iconAssetName)
|
||||
{
|
||||
if (modifiers != null)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public sealed partial class StatConfig
|
||||
{
|
||||
public StatConfig()
|
||||
{
|
||||
}
|
||||
|
||||
public StatConfig(
|
||||
StatType statType,
|
||||
string name = "",
|
||||
float defaultBaseValue = 0f,
|
||||
bool hasMin = false,
|
||||
float minValue = 0f,
|
||||
bool hasMax = false,
|
||||
float maxValue = 0f,
|
||||
bool isPercentDisplay = false)
|
||||
{
|
||||
StatType = statType;
|
||||
Name = name;
|
||||
DefaultBaseValue = defaultBaseValue;
|
||||
HasMin = hasMin;
|
||||
MinValue = minValue;
|
||||
HasMax = hasMax;
|
||||
MaxValue = maxValue;
|
||||
IsPercentDisplay = isPercentDisplay;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b910e53a2454b5f903517865c36ad18
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
/// <summary>
|
||||
/// 属性修饰器。
|
||||
/// 包含修饰数值、修饰类型(固定值/百分比加算/独立乘区)以及来源对象(道具/武器/羁绊/特质/Buff)。
|
||||
/// </summary>
|
||||
public sealed class StatModifier
|
||||
{
|
||||
public float Value { get; }
|
||||
public ModifierType Type { get; }
|
||||
public object Source { get; }
|
||||
|
||||
public StatModifier(float value, ModifierType type, object source = null)
|
||||
{
|
||||
Value = value;
|
||||
Type = type;
|
||||
Source = source;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从 Luban 导出的 modifier 数据结构转换。
|
||||
/// </summary>
|
||||
/// <param name="mod">Luban modifier 数据实例</param>
|
||||
/// <param name="source">来源对象引用</param>
|
||||
public static StatModifier FromLuban(StatModifierConfig mod, object source = null)
|
||||
{
|
||||
if (mod == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(mod));
|
||||
}
|
||||
|
||||
ModifierType type = mod.ModifierType;
|
||||
return new StatModifier(mod.Value, type, source);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[StatModifier Type={Type}, Value={Value}, Source={Source}]";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 887b4b22fce86cb43b95cfdf3c6b967c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public sealed partial class StatModifierConfig
|
||||
{
|
||||
public StatModifierConfig()
|
||||
{
|
||||
}
|
||||
|
||||
public StatModifierConfig(StatType statType, float value, ModifierType modifierType)
|
||||
{
|
||||
StatType = statType;
|
||||
Value = value;
|
||||
ModifierType = modifierType;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public class StatProperty
|
||||
{
|
||||
public float Value;
|
||||
public float Percent;
|
||||
|
||||
public StatProperty()
|
||||
{
|
||||
Value = 0f;
|
||||
Percent = 1f;
|
||||
}
|
||||
|
||||
public StatProperty(float value, float percent)
|
||||
{
|
||||
Value = value;
|
||||
Percent = percent;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18e7bc9587114ae4a91c70f829543de8
|
||||
timeCreated: 1770353735
|
||||
@@ -1,70 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SepCore.Definition
|
||||
{
|
||||
public sealed partial class modifier
|
||||
{
|
||||
public StatType StatType => Key;
|
||||
|
||||
/// <summary>
|
||||
/// 实际参与数值计算的浮点数值。
|
||||
/// 1. 百分比加成(IsPercent == true):表内千分比(如 200 代表 20%),转换为 0.2f。
|
||||
/// 2. 非百分比加成(IsPercent == false):移动速度原为 float 放大了 1000 倍(如 800 代表 0.8f),除以 1000f;其余(如生命+53、攻击+10)直接使用原值。
|
||||
/// </summary>
|
||||
public float RealValue
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsPercent)
|
||||
{
|
||||
return Value / 1000f;
|
||||
}
|
||||
|
||||
if (Key == StatType.MovementSpeed)
|
||||
{
|
||||
return Value / 1000f;
|
||||
}
|
||||
|
||||
return Value;
|
||||
}
|
||||
}
|
||||
|
||||
public modifier()
|
||||
{
|
||||
}
|
||||
|
||||
public modifier(StatType key, int value, bool isPercent)
|
||||
{
|
||||
Key = key;
|
||||
Value = value;
|
||||
IsPercent = isPercent;
|
||||
}
|
||||
|
||||
public modifier(StatType key, float value, bool isPercent)
|
||||
{
|
||||
Key = key;
|
||||
Value = (isPercent || key == StatType.MovementSpeed)
|
||||
? Mathf.RoundToInt(value * 1000f)
|
||||
: Mathf.RoundToInt(value);
|
||||
IsPercent = isPercent;
|
||||
}
|
||||
|
||||
public string ToDisplayString()
|
||||
{
|
||||
if (IsPercent)
|
||||
{
|
||||
float percent = Value / 10f;
|
||||
return $"{Key} +{percent:0.##}%";
|
||||
}
|
||||
|
||||
if (Key == StatType.MovementSpeed)
|
||||
{
|
||||
float speed = Value / 1000f;
|
||||
return $"{Key} +{speed:0.##}";
|
||||
}
|
||||
|
||||
return $"{Key} +{Value}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,8 @@ namespace SepCore.Entity
|
||||
|
||||
public int Attack => Config.Attack;
|
||||
|
||||
public DamageType DamageType => Config.DamageType;
|
||||
|
||||
public string Title => Config.WeaponType.ToString();
|
||||
|
||||
public string Sprite => Config.Sprite;
|
||||
@@ -38,7 +40,7 @@ namespace SepCore.Entity
|
||||
|
||||
public IReadOnlyDictionary<ParamType, int> Parameters => Config.Parameters;
|
||||
|
||||
public IReadOnlyList<modifier> Modifiers => Config.Modifiers;
|
||||
public IReadOnlyList<StatModifierConfig> Modifiers => Config.StatModifierConfigs;
|
||||
|
||||
public int GetParam(ParamType paramType)
|
||||
{
|
||||
|
||||
@@ -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