调整部分数据表配置,优化 SpriteCache 功能
This commit is contained in:
@@ -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 + ","
|
||||
+ "}";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user