添加 SepCore.Runtime 和 SepCore.Base 程序集
- 暂时将 Entity 全部归进 Runtime 程序集里 - 调整部分 UI 的 UseCase/RawData/Context 之间的关系,让 RawData 更接近业务原始数据,Context 更接近 UI 直接可读的数据 - 调整其他程序集的引用关系
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
using Components;
|
||||
using SepCore.DataTable;
|
||||
using SepCore.Definition;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
public void OnAttach(StatComponent statComponent)
|
||||
{
|
||||
if (_modifiers == null || statComponent == null) return;
|
||||
foreach (var modifier in _modifiers)
|
||||
{
|
||||
statComponent.AddModifier(modifier);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnDetach(StatComponent statComponent)
|
||||
{
|
||||
if (_modifiers == null || statComponent == null) return;
|
||||
foreach (var modifier in _modifiers)
|
||||
{
|
||||
statComponent.RemoveModifier(modifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 135b5ab1b6f5491989f080cf8b949201
|
||||
timeCreated: 1770212750
|
||||
Reference in New Issue
Block a user