引入属性、伤害管线
This commit is contained in:
@@ -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 + ","
|
||||
|
||||
Reference in New Issue
Block a user