变量模块;Element启用控制

This commit is contained in:
SoulliesOfficial
2025-03-20 19:30:42 -04:00
parent ab86d6d985
commit 54de98b0fa
26 changed files with 1976 additions and 44 deletions

View File

@@ -20,9 +20,11 @@ namespace Ichni.RhythmGame
{
effectCollection = new Dictionary<string, List<EffectBase>>();
if (preset == EffectSubmodulePreset.Default) //对于默认的效果次级模块,只有Default效果集合
if (preset == EffectSubmodulePreset.Default) //对于默认的效果次级模块,有Prior、Default、Late三个效果集合
{
effectCollection.Add("Prior", new List<EffectBase>());
effectCollection.Add("Default", new List<EffectBase>());
effectCollection.Add("Late", new List<EffectBase>());
}
else if (preset == EffectSubmodulePreset.Note) //对于Note的效果次级模块在Note的不同状态下有独立的效果集合
{
@@ -33,6 +35,7 @@ namespace Ichni.RhythmGame
effectCollection.Add("Good", new List<EffectBase>());
effectCollection.Add("Bad", new List<EffectBase>());
effectCollection.Add("Miss", new List<EffectBase>());
effectCollection.Add("AfterJudge", new List<EffectBase>());
}
(attachedGameElement as IHaveEffectSubmodule).effectSubmodule = this;
@@ -79,7 +82,7 @@ namespace Ichni.RhythmGame
var effectNameInputField = inspector.GenerateInputField(container, "Effect Name");
var addEffectButton = inspector.GenerateButton(this, container, "Add Effect", () =>
{
if (EffectSubmodule.EffectCollection.TryGetValue(effectNameInputField.GetValue<string>(), out var newEffect))
if (EffectCollection.TryGetValue(effectNameInputField.GetValue<string>(), out var newEffect))
{
effectCollection[effect.Key].Add(newEffect);
inspectorMain.SetInspector(attachedGameElement);
@@ -107,7 +110,9 @@ namespace Ichni.RhythmGame
{ "Bloom", new BloomEffect(1, 2, CustomCurvePresets.Parabolic(1,0,2)) },
{ "CameraShake", new CameraShakeEffect(1, 50, 1, 1, 1) },
{ "ChromaticAberration", new ChromaticAberrationEffect(1, 1, CustomCurvePresets.Parabolic(1,0,1)) },
{ "Vignette", new VignetteEffect(1, 1, 0.4f, Color.black, CustomCurvePresets.Parabolic(1,0,1)) }
{ "Vignette", new VignetteEffect(1, 1, 0.4f, Color.black, CustomCurvePresets.Parabolic(1,0,1)) },
{ "SetInteger", new SetIntegerEffect("New Variable", 0, false, 0, 1) },
{ "EnableControl", new EnableControlEffect(null, "New Variable", 0, false, "") },
};
}