狗屎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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81ca349cbc0a67e40bb42b89d4702a3c
|
||||
@@ -0,0 +1,10 @@
|
||||
using SLSUtilities.Feedback;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Effects.Feedback
|
||||
{
|
||||
public class BloomAction : CurveShakeAction
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f30cb59f5ebeee44e99100865ced4e94
|
||||
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using SLSUtilities.Feedback;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Effects.Feedback
|
||||
{
|
||||
/// <summary>
|
||||
/// 高级色散反馈动作,通过 ChromaticAberrationShakeEvent 触发 ChromaticAberrationShaker。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[FeedbackActionColor(0.8f, 0.4f, 0.8f)]
|
||||
public class ChromaticAberrationAction : PostprocessingActionBase
|
||||
{
|
||||
public override string DisplayName => "Chromatic Aberration";
|
||||
|
||||
public FloatCurveChannel intensityCurve = FloatCurveChannel.CreateDefault(remapMax: 1f);
|
||||
|
||||
/// <summary>
|
||||
/// 是否同时修改中心点。
|
||||
/// </summary>
|
||||
[LabelText("修改中心点")]
|
||||
public bool modifyCenter;
|
||||
|
||||
[ShowIf("modifyCenter")]
|
||||
[LabelText("中心点曲线")]
|
||||
public Vector2CurveChannel centerCurve = Vector2CurveChannel.CreateDefault();
|
||||
|
||||
/// <summary>
|
||||
/// 是否同时修改抖动强度。
|
||||
/// </summary>
|
||||
[LabelText("修改抖动")]
|
||||
public bool modifyJitter;
|
||||
|
||||
[ShowIf("modifyJitter")]
|
||||
[LabelText("抖动曲线")]
|
||||
public FloatCurveChannel jitterCurve = FloatCurveChannel.CreateDefault(remapMax: 0.5f);
|
||||
|
||||
protected override void TriggerEvent(FeedbackContext context)
|
||||
{
|
||||
ChromaticAberrationShakeEvent.Trigger(
|
||||
context,
|
||||
intensityCurve,
|
||||
modifyCenter,
|
||||
centerCurve,
|
||||
modifyJitter,
|
||||
jitterCurve
|
||||
);
|
||||
}
|
||||
|
||||
protected override void StopEvent(FeedbackContext context)
|
||||
{
|
||||
ChromaticAberrationShakeEvent.Trigger(context, intensityCurve, stop: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e0386d39ab6252478e73744f7b3b20b
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using SLSUtilities.Feedback;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Effects.Feedback
|
||||
{
|
||||
/// <summary>
|
||||
/// 径向模糊反馈动作,通过 RadialBlurShakeEvent 触发 RadialBlurShaker。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[FeedbackActionColor(0.6f, 0.4f, 0.9f)]
|
||||
public class RadialBlurAction : PostprocessingActionBase
|
||||
{
|
||||
public override string DisplayName => "Radial Blur";
|
||||
|
||||
public FloatCurveChannel intensityCurve = FloatCurveChannel.CreateDefault(remapMax: 1f);
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改模糊中心点。关闭时保持 Volume 当前设置。
|
||||
/// </summary>
|
||||
[LabelText("修改中心点")]
|
||||
public bool modifyCenter;
|
||||
|
||||
/// <summary>
|
||||
/// 模糊中心的屏幕坐标 (0-1)。(0.5, 0.5) 为屏幕正中心。
|
||||
/// </summary>
|
||||
[ShowIf("modifyCenter")]
|
||||
[LabelText("中心点")]
|
||||
public Vector2 center = new Vector2(0.5f, 0.5f);
|
||||
|
||||
protected override void TriggerEvent(FeedbackContext context)
|
||||
{
|
||||
RadialBlurShakeEvent.Trigger(context, intensityCurve, modifyCenter, center);
|
||||
}
|
||||
|
||||
protected override void StopEvent(FeedbackContext context)
|
||||
{
|
||||
RadialBlurShakeEvent.Trigger(context, default, stop: true);
|
||||
}
|
||||
|
||||
public override bool Validate(out string error)
|
||||
{
|
||||
error = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5be6f051b57e9a43ae22b286bc29c95
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using SLSUtilities.Feedback;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Effects.Feedback
|
||||
{
|
||||
/// <summary>
|
||||
/// 黑白闪反馈动作,通过 StrobeFlashShakeEvent 触发 StrobeFlashShaker。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[FeedbackActionColor(1.0f, 0.9f, 0.3f)]
|
||||
public class StrobeFlashAction : PostprocessingActionBase
|
||||
{
|
||||
public override string DisplayName => "Strobe Flash";
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改频率和颜色参数。
|
||||
/// </summary>
|
||||
[TitleGroup("闪烁设置")]
|
||||
[LabelText("修改额外参数")]
|
||||
public bool modifyExtra;
|
||||
|
||||
[ShowIf("modifyExtra")]
|
||||
[LabelText("频率曲线")]
|
||||
public FloatCurveChannel frequencyCurve = FloatCurveChannel.CreateDefault(remapMax: 15f);
|
||||
|
||||
[ShowIf("modifyExtra")]
|
||||
[LabelText("高颜色")]
|
||||
public ColorCurveChannel colorHigh = ColorCurveChannel.CreateDefault();
|
||||
|
||||
[ShowIf("modifyExtra")]
|
||||
[LabelText("低颜色")]
|
||||
public ColorCurveChannel colorLow = ColorCurveChannel.CreateDefault();
|
||||
|
||||
protected override void TriggerEvent(FeedbackContext context)
|
||||
{
|
||||
StrobeFlashShakeEvent.Trigger(
|
||||
context,
|
||||
context.duration,
|
||||
modifyExtra,
|
||||
frequencyCurve,
|
||||
colorHigh,
|
||||
colorLow
|
||||
);
|
||||
}
|
||||
|
||||
protected override void StopEvent(FeedbackContext context)
|
||||
{
|
||||
StrobeFlashShakeEvent.Trigger(context, 0f, stop: true);
|
||||
}
|
||||
|
||||
public override bool Validate(out string error)
|
||||
{
|
||||
error = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24d976dc110cab94db2c00346fe0ebc6
|
||||
@@ -0,0 +1,115 @@
|
||||
using System;
|
||||
using Sirenix.OdinInspector;
|
||||
using SLSUtilities.Feedback;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Effects.Feedback
|
||||
{
|
||||
/// <summary>
|
||||
/// 高级暗角反馈动作,通过 VignetteShakeEvent 触发 VignetteShaker。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[FeedbackActionColor(0.9f, 0.5f, 0.3f)]
|
||||
public class VignetteAction : PostprocessingActionBase
|
||||
{
|
||||
public override string DisplayName => "Vignette";
|
||||
|
||||
|
||||
public FloatCurveChannel intensityCurve = FloatCurveChannel.CreateDefault(remapMax: 1f);
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改暗角中心点。
|
||||
/// </summary>
|
||||
[LabelText("修改中心点")]
|
||||
public bool modifyCenter;
|
||||
|
||||
/// <summary>
|
||||
/// 模糊中心的屏幕坐标 (0-1)。(0.5, 0.5) 为屏幕正中心。
|
||||
/// </summary>
|
||||
[HideIf("modifyCenter")]
|
||||
[LabelText("中心点")]
|
||||
public Vector2 center = new Vector2(0.5f, 0.5f);
|
||||
|
||||
[ShowIf("modifyCenter")]
|
||||
public Vector2CurveChannel centerCurve = Vector2CurveChannel.CreateDefault();
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改颜色。
|
||||
/// </summary>
|
||||
[LabelText("修改颜色")]
|
||||
public bool modifyColors;
|
||||
|
||||
[HideIf("modifyColors")]
|
||||
public Color outColor;
|
||||
|
||||
[HideIf("modifyColors")]
|
||||
public Color innerColor;
|
||||
|
||||
/// <summary>
|
||||
/// 外圈颜色。
|
||||
/// </summary>
|
||||
[ShowIf("modifyColors")]
|
||||
[LabelText("外圈颜色")]
|
||||
public ColorCurveChannel outerColorCurve = ColorCurveChannel.CreateDefault();
|
||||
|
||||
/// <summary>
|
||||
/// 内圈颜色。
|
||||
/// </summary>
|
||||
[ShowIf("modifyColors")]
|
||||
[LabelText("内圈颜色")]
|
||||
public ColorCurveChannel innerColorCurve = ColorCurveChannel.CreateDefault();
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改形状。
|
||||
/// </summary>
|
||||
[LabelText("修改形状")]
|
||||
public bool modifyShape;
|
||||
|
||||
[HideIf("modifyShape")]
|
||||
public float smoothness;
|
||||
|
||||
[HideIf("modifyShape")]
|
||||
public float roundness;
|
||||
|
||||
/// <summary>
|
||||
/// 柔和度曲线。
|
||||
/// </summary>
|
||||
[ShowIf("modifyShape")]
|
||||
[LabelText("柔和度曲线")]
|
||||
public FloatCurveChannel smoothnessCurve = FloatCurveChannel.CreateDefault(remapMax: 0.5f);
|
||||
|
||||
/// <summary>
|
||||
/// 圆度曲线。
|
||||
/// </summary>
|
||||
[ShowIf("modifyShape")]
|
||||
[LabelText("圆度曲线")]
|
||||
public FloatCurveChannel roundnessCurve = FloatCurveChannel.CreateDefault(remapMax: 1f);
|
||||
|
||||
protected override void TriggerEvent(FeedbackContext context)
|
||||
{
|
||||
VignetteShakeEvent.Trigger(
|
||||
context,
|
||||
intensityCurve,
|
||||
modifyCenter,
|
||||
center,
|
||||
modifyColors,
|
||||
outerColorCurve,
|
||||
innerColorCurve,
|
||||
modifyShape,
|
||||
smoothnessCurve,
|
||||
roundnessCurve
|
||||
);
|
||||
}
|
||||
|
||||
protected override void StopEvent(FeedbackContext context)
|
||||
{
|
||||
VignetteShakeEvent.Trigger(context, intensityCurve, stop: true);
|
||||
}
|
||||
|
||||
public override bool Validate(out string error)
|
||||
{
|
||||
error = null;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 970887032c5ce30478691975811e6af0
|
||||
Reference in New Issue
Block a user