31 lines
956 B
C#
31 lines
956 B
C#
using SLSFramework.General;
|
|
using SLSFramework.Rendering.PostProcessing;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Effects
|
|
{
|
|
public partial class RGBSplitGlitchSubmodule : PostProcessingSubmoduleBase
|
|
{
|
|
public LerpFloat intensity;
|
|
|
|
public RGBSplitGlitchSubmodule(PostProcessingManager owner) : base(owner)
|
|
{
|
|
this.intensity = new LerpFloat(0, 0.05f);
|
|
}
|
|
|
|
public override void Update(float factor)
|
|
{
|
|
intensity.Update(factor);
|
|
if (owner.GetVolumeComponent<RGBSplitGlitch>(out var rgbSplitGlitch))
|
|
{
|
|
rgbSplitGlitch.intensity.value = intensity.currentValue;
|
|
}
|
|
}
|
|
}
|
|
|
|
public partial class RGBSplitGlitchSubmodule
|
|
{
|
|
public void ModifyIntensity(float value) => ModifyCurrentValue(intensity, value);
|
|
public void SetIntensity(float value) => SetCurrentValue(intensity, value);
|
|
}
|
|
} |