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