迁移 EntityData 到 Base 中

- 新增 EntityDataFactory 工厂类,提供创建 EntityData 的统一入口
- 移出 EntityData 及派生类对 GameEntry 的依赖并移入 SepCore.Base 程序集中
This commit is contained in:
SepComet
2026-06-03 15:12:55 +08:00
parent 91f70dd783
commit 5de3fdc795
52 changed files with 284 additions and 315 deletions
@@ -0,0 +1,36 @@
using SepCore.DataTable;
namespace SepCore.Definition
{
public class PropItem
{
private readonly StatModifier[] _modifiers;
public string Title { get; private set; }
public string IconAssetName { get; private set; }
public ItemRarity Rarity { get; private set; }
public StatModifier[] Modifiers => _modifiers;
public PropItem(DRProp prop)
{
if (prop == null) return;
_modifiers = prop.Modifiers;
Title = prop.Title;
Rarity = prop.Rarity;
IconAssetName = prop.IconAssetName;
}
public PropItem(StatModifier[] modifiers)
{
_modifiers = modifiers;
}
public PropItem(StatModifier[] modifiers, ItemRarity rarity, string title, string iconAssetName)
{
_modifiers = modifiers;
Title = title;
Rarity = rarity;
IconAssetName = iconAssetName;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 135b5ab1b6f5491989f080cf8b949201
timeCreated: 1770212750