Signed-off-by: TRAfoer <lhf190@outlook.com>
This commit is contained in:
2025-09-21 13:34:59 +08:00
parent 7f7324bdb8
commit 4966ba353a
29 changed files with 1528 additions and 1981 deletions

View File

@@ -108,8 +108,15 @@ namespace Ichni.RhythmGame
{
EffectBase newEffect = factory.Invoke(); // 创建新实例
newEffect.attachedGameElement = attachedGameElement;
effectCollection[effect.Key].Add(newEffect);
newEffect.AccommodatingList = effectCollection[effect.Key];
var list = effectCollection[effect.Key];
// 自动继承上一个Effect的参数
if (list.Count > 0)
{
var last = list[list.Count - 1];
newEffect.CopyParametersFrom(last);
}
list.Add(newEffect);
newEffect.AccommodatingList = list;
inspectorMain.SetInspector(attachedGameElement);
}
else
@@ -373,6 +380,10 @@ namespace Ichni.RhythmGame
});
}
public virtual void CopyParametersFrom(EffectBase other)
{
// 默认实现什么都不做,子类重写
}
}
namespace Beatmap