32 lines
922 B
C#
32 lines
922 B
C#
using DG.Tweening;
|
|
using SLSUtilities.General;
|
|
using SLSUtilities.Rendering.PostProcessing;
|
|
using UnityEngine;
|
|
|
|
namespace Cielonos.MainGame.Effects
|
|
{
|
|
public partial class SpeedLinesSubmodule : PostProcessingSubmoduleBase
|
|
{
|
|
public LerpFloat remap;
|
|
|
|
public SpeedLinesSubmodule(PostProcessingManager manager) : base(manager)
|
|
{
|
|
remap = new LerpFloat(1, 0.02f, 0.1f);
|
|
}
|
|
|
|
public override void Update(float factor)
|
|
{
|
|
remap.Update(factor);
|
|
if (owner.GetVolumeComponent<SpeedLines>(out var speedLines))
|
|
{
|
|
speedLines.speedLinesRemap.value = remap.currentValue;
|
|
}
|
|
}
|
|
}
|
|
|
|
public partial class SpeedLinesSubmodule
|
|
{
|
|
public void SetRemap(float value) => remap.targetValue = value;
|
|
public void ModifyRemap(float value) => ModifyCurrentValue(remap, value);
|
|
}
|
|
} |