狗屎Minimax坏我代码
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using SLSUtilities.Feedback;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Effects.Feedback
|
||||
{
|
||||
/// <summary>
|
||||
/// Anime ACES 反馈动作,通过 AnimeACESShakeEvent 触发 AnimeACESShaker。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[FeedbackActionColor(0.9f, 0.4f, 0.2f)]
|
||||
public class AnimeACESAction : PostprocessingActionBase
|
||||
{
|
||||
public override string DisplayName => "Anime ACES Tone";
|
||||
|
||||
[TitleGroup("曝光度")]
|
||||
[LabelText("修改曝光度")]
|
||||
public bool modifyExposure;
|
||||
|
||||
[ShowIf("modifyExposure")]
|
||||
[LabelText("曝光度曲线")]
|
||||
public FloatCurveChannel exposureChannel = FloatCurveChannel.CreateDefault();
|
||||
|
||||
[TitleGroup("对比度")]
|
||||
[LabelText("修改对比度")]
|
||||
public bool modifyContrast;
|
||||
|
||||
[ShowIf("modifyContrast")]
|
||||
[LabelText("对比度曲线")]
|
||||
public FloatCurveChannel contrastChannel = FloatCurveChannel.CreateDefault();
|
||||
|
||||
[TitleGroup("饱和度")]
|
||||
[LabelText("修改饱和度")]
|
||||
public bool modifySaturation;
|
||||
|
||||
[ShowIf("modifySaturation")]
|
||||
[LabelText("饱和度曲线")]
|
||||
public FloatCurveChannel saturationChannel = FloatCurveChannel.CreateDefault();
|
||||
|
||||
[TitleGroup("色相")]
|
||||
[LabelText("修改色相")]
|
||||
public bool modifyHue;
|
||||
|
||||
[ShowIf("modifyHue")]
|
||||
[LabelText("色相曲线")]
|
||||
public FloatCurveChannel hueChannel = FloatCurveChannel.CreateDefault();
|
||||
|
||||
[TitleGroup("颜色滤镜")]
|
||||
[LabelText("修改颜色滤镜")]
|
||||
public bool modifyColorFilter;
|
||||
|
||||
[ShowIf("modifyColorFilter")]
|
||||
[LabelText("颜色滤镜渐变")]
|
||||
public ColorCurveChannel colorFilterChannel = ColorCurveChannel.CreateDefault();
|
||||
|
||||
protected override void TriggerEvent(FeedbackContext context)
|
||||
{
|
||||
AnimeACESShakeEvent.Trigger(
|
||||
context,
|
||||
exposureChannel,
|
||||
contrastChannel,
|
||||
saturationChannel,
|
||||
hueChannel,
|
||||
colorFilterChannel
|
||||
);
|
||||
}
|
||||
|
||||
protected override void StopEvent(FeedbackContext context)
|
||||
{
|
||||
AnimeACESShakeEvent.Trigger(context, stop: true);
|
||||
}
|
||||
|
||||
public override bool Validate(out string error)
|
||||
{
|
||||
if (!modifyExposure && !modifyContrast && !modifySaturation && !modifyHue && !modifyColorFilter)
|
||||
{
|
||||
error = "No channel is enabled. Enable at least one channel.";
|
||||
return false;
|
||||
}
|
||||
error = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user