同步
This commit is contained in:
@@ -56,10 +56,10 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
else if (positionX.isSwitchingReturnType || positionY.isSwitchingReturnType || positionZ.isSwitchingReturnType)
|
||||
{
|
||||
animationReturnType = FlexibleReturnType.MiddleExecuting;
|
||||
//animationReturnType = FlexibleReturnType.MiddleExecuting;
|
||||
//Vector3 currentPosition = new Vector3(positionX.value, positionY.value, positionZ.value);
|
||||
//targetTransformSubmodule.positionOffset += currentPosition;
|
||||
targetTransformSubmodule.positionDirtyMark = true;
|
||||
//targetTransformSubmodule.positionDirtyMark = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -59,10 +59,10 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
else if (scaleX.isSwitchingReturnType || scaleY.isSwitchingReturnType || scaleZ.isSwitchingReturnType)
|
||||
{
|
||||
animationReturnType = FlexibleReturnType.MiddleExecuting;
|
||||
//animationReturnType = FlexibleReturnType.MiddleExecuting;
|
||||
//Vector3 currentScale = new Vector3(scaleX.value, scaleY.value, scaleZ.value);
|
||||
//targetTransformSubmodule.scaleOffset += currentScale;
|
||||
targetTransformSubmodule.scaleDirtyMark = true;
|
||||
//targetTransformSubmodule.scaleDirtyMark = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -54,10 +54,11 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
else if (eulerAngleX.isSwitchingReturnType || eulerAngleY.isSwitchingReturnType || eulerAngleZ.isSwitchingReturnType)
|
||||
{
|
||||
animationReturnType = FlexibleReturnType.MiddleExecuting;
|
||||
//animationReturnType = FlexibleReturnType.MiddleExecuting;
|
||||
//Vector3 currentEulerAngles = new Vector3(eulerAngleX.value, eulerAngleY.value, eulerAngleZ.value);
|
||||
//targetTransformSubmodule.eulerAnglesOffset += currentEulerAngles;
|
||||
targetTransformSubmodule.eulerAnglesDirtyMark = true;
|
||||
//Debug.Break();
|
||||
//targetTransformSubmodule.eulerAnglesDirtyMark = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
if (HaveSameSubmodule)
|
||||
{
|
||||
Debug.LogAssertion($"存在重复的Submodule: {GetType()},此操作无效");
|
||||
Debug.LogAssertion($"物体 '{attachedGameElement.name}' 已经有一个类型为 '{this.GetType().Name}' 的 Submodule 了,新的 Submodule 将不会被添加。");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ namespace Ichni.RhythmGame
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
base.SetDefaultSubmodules();
|
||||
dirtyMarkSubmodule = new DirtyMarkSubmodule(this);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -38,7 +37,8 @@ namespace Ichni.RhythmGame
|
||||
|
||||
environmentObject.isStatic = isStatic;
|
||||
environmentObject.gameObject.isStatic = isStatic;
|
||||
|
||||
environmentObject.dirtyMarkSubmodule = new DirtyMarkSubmodule(environmentObject);
|
||||
|
||||
return environmentObject;
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace Ichni.RhythmGame
|
||||
{
|
||||
#region [暴露属性字段] Camera View & Settings
|
||||
public Camera cam;
|
||||
public Transform rotationPoint;
|
||||
public Transform positionPoint;
|
||||
//public Transform rotationPoint;
|
||||
//public Transform positionPoint;
|
||||
public Transform cameraTransform;
|
||||
|
||||
public CameraViewType cameraViewType;
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace Ichni.RhythmGame
|
||||
public class BloomEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
@@ -15,10 +14,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public BloomEffect(float duration, float peak, AnimationCurve intensityCurve)
|
||||
: base(duration) // 激活时间线
|
||||
public BloomEffect(float effectTime, float peak, AnimationCurve intensityCurve)
|
||||
: base(effectTime) // 激活时间线
|
||||
{
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
@@ -60,3 +59,5 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ namespace Ichni.RhythmGame
|
||||
public class CameraOffsetEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public Vector3 offsetValue;
|
||||
public Vector3 offsetValue;
|
||||
public AnimationCurve offsetCurve;
|
||||
|
||||
Transform gameCameraTransform => GameManager.Instance.cameraManager.gameCamera.cam.transform;
|
||||
@@ -16,10 +15,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public CameraOffsetEffect(float duration, Vector3 offsetValue, AnimationCurve offsetCurve)
|
||||
public CameraOffsetEffect(float effectTime, Vector3 offsetValue, AnimationCurve offsetCurve)
|
||||
{
|
||||
this.effectTime = this.duration;
|
||||
this.duration = duration;
|
||||
this.effectTime = this.effectTime;
|
||||
this.effectTime = effectTime;
|
||||
this.offsetValue = offsetValue;
|
||||
this.offsetCurve = offsetCurve;
|
||||
}
|
||||
@@ -34,7 +33,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void PreExecute()
|
||||
{
|
||||
offsetTweener = gameCameraTransform.DOBlendableLocalMoveBy(offsetValue, duration).SetEase(offsetCurve).Play();
|
||||
offsetTweener = gameCameraTransform.DOBlendableLocalMoveBy(offsetValue, effectTime).SetEase(offsetCurve).Play();
|
||||
}
|
||||
|
||||
public override void Adjust()
|
||||
@@ -51,4 +50,5 @@ namespace Ichni.RhythmGame
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Ichni.RhythmGame
|
||||
public class CameraShakeEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float frequency;
|
||||
public float amplitudeX;
|
||||
public float amplitudeY;
|
||||
@@ -16,10 +15,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public CameraShakeEffect(float duration, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ)
|
||||
: base(duration)
|
||||
public CameraShakeEffect(float effectTime, float frequency, float amplitudeX, float amplitudeY, float amplitudeZ)
|
||||
: base(effectTime)
|
||||
{
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.frequency = frequency; // 数值越大抖动越跳跃
|
||||
this.amplitudeX = amplitudeX;
|
||||
this.amplitudeY = amplitudeY;
|
||||
@@ -51,7 +50,7 @@ namespace Ichni.RhythmGame
|
||||
float offsetX = (Mathf.PerlinNoise(timeFactor, 0) - 0.5f) * 2f * amplitudeX * dampening;
|
||||
float offsetY = (Mathf.PerlinNoise(0, timeFactor) - 0.5f) * 2f * amplitudeY * dampening;
|
||||
float offsetZ = (Mathf.PerlinNoise(timeFactor, timeFactor) - 0.5f) * 2f * amplitudeZ * dampening;
|
||||
|
||||
|
||||
// 这次应用仅在局部空间偏移,非常干净轻量
|
||||
_cameraTransform.localPosition = new Vector3(offsetX, offsetY, offsetZ);
|
||||
}
|
||||
@@ -73,3 +72,4 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ namespace Ichni.RhythmGame
|
||||
public class CameraTiltEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public Vector3 tiltValue;
|
||||
public Vector3 tiltValue;
|
||||
public AnimationCurve tiltCurve;
|
||||
|
||||
GameCamera gameCamera=> GameManager.Instance.cameraManager.gameCamera;
|
||||
@@ -19,10 +18,9 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public CameraTiltEffect(float duration, Vector3 tiltValue, AnimationCurve tiltCurve)
|
||||
public CameraTiltEffect(float effectTime, Vector3 tiltValue, AnimationCurve tiltCurve)
|
||||
{
|
||||
this.effectTime = duration;
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.tiltValue = tiltValue;
|
||||
this.tiltCurve = tiltCurve;
|
||||
}
|
||||
@@ -38,7 +36,7 @@ namespace Ichni.RhythmGame
|
||||
|
||||
public override void PreExecute()
|
||||
{
|
||||
tiltTweener = gameCamera.cam.transform.DOBlendableLocalRotateBy(tiltValue, duration, RotateMode.FastBeyond360).SetEase(tiltCurve).Play();
|
||||
tiltTweener = gameCamera.cam.transform.DOBlendableLocalRotateBy(tiltValue, effectTime, RotateMode.FastBeyond360).SetEase(tiltCurve).Play();
|
||||
}
|
||||
public override void Adjust()
|
||||
{
|
||||
@@ -53,4 +51,5 @@ namespace Ichni.RhythmGame
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ namespace Ichni.RhythmGame
|
||||
public class CameraZoomEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float relativeZoom;
|
||||
public AnimationCurve zoomCurve;
|
||||
|
||||
@@ -15,10 +14,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public CameraZoomEffect(float duration, float relativeZoom, AnimationCurve zoomCurve)
|
||||
: base(duration)
|
||||
public CameraZoomEffect(float effectTime, float relativeZoom, AnimationCurve zoomCurve)
|
||||
: base(effectTime)
|
||||
{
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.relativeZoom = relativeZoom;
|
||||
this.zoomCurve = zoomCurve;
|
||||
}
|
||||
@@ -58,3 +57,4 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace Ichni.RhythmGame
|
||||
public class ChromaticAberrationEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
|
||||
@@ -16,10 +15,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public ChromaticAberrationEffect(float duration, float peak, AnimationCurve intensityCurve)
|
||||
: base(duration) // 【修改1】调用基类含时构造,将 effectTime 赋为 duration,激活时长逻辑
|
||||
public ChromaticAberrationEffect(float effectTime, float peak, AnimationCurve intensityCurve)
|
||||
: base(effectTime) // 【修改1】调用基类含时构造,将 effectTime 赋为 duration,激活时长逻辑
|
||||
{
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
@@ -67,3 +66,5 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -160,3 +160,4 @@ namespace Ichni.RhythmGame
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,4 +54,4 @@ namespace Ichni.RhythmGame
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,16 +7,15 @@ namespace Ichni.RhythmGame
|
||||
public class HighPassFilterEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float peak;
|
||||
public AnimationCurve intensityCurve;
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public HighPassFilterEffect(float duration, float peak, AnimationCurve intensityCurve)
|
||||
public HighPassFilterEffect(float effectTime, float peak, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.peak = peak;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
@@ -26,15 +25,16 @@ namespace Ichni.RhythmGame
|
||||
public override void Adjust()
|
||||
{
|
||||
/*MMF_Player effect = LeanPool.Spawn(GameManager.Instance.basePrefabs.highPassFilterEffect).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().Duration = duration;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().effectTime = effectTime;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().RemapHighPassZero = 10;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().RemapHighPassOne = peak;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterHighPass>().ShakeHighPass = intensityCurve;
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);*/
|
||||
LeanPool.Despawn(effect.gameObject, effectTime);*/
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,16 +9,15 @@ namespace Ichni.RhythmGame
|
||||
public class LowPassFilterEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float bottom;
|
||||
public AnimationCurve intensityCurve;
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public LowPassFilterEffect(float duration, float bottom, AnimationCurve intensityCurve)
|
||||
public LowPassFilterEffect(float effectTime, float bottom, AnimationCurve intensityCurve)
|
||||
{
|
||||
this.effectTime = 0;
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.bottom = bottom;
|
||||
this.intensityCurve = intensityCurve;
|
||||
}
|
||||
@@ -28,15 +27,16 @@ namespace Ichni.RhythmGame
|
||||
public override void Adjust()
|
||||
{
|
||||
/*MMF_Player effect = LeanPool.Spawn(GameManager.Instance.basePrefabs.lowPassFilterEffect).GetComponent<MMF_Player>();
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterLowPass>().Duration = duration;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterLowPass>().effectTime = effectTime;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterLowPass>().RemapLowPassZero = 22000;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterLowPass>().RemapLowPassOne = bottom;
|
||||
effect.GetFeedbackOfType<MMF_AudioFilterLowPass>().ShakeLowPass = intensityCurve;
|
||||
effect.PlayFeedbacks();
|
||||
LeanPool.Despawn(effect.gameObject, duration);*/
|
||||
LeanPool.Despawn(effect.gameObject, effectTime);*/
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -219,4 +219,4 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace Ichni.RhythmGame
|
||||
public class PixelateEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float bottomX;
|
||||
public float bottomY;
|
||||
public AnimationCurve intensityCurve;
|
||||
@@ -16,10 +15,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public PixelateEffect(float duration, float bottomX, float bottomY, AnimationCurve intensityCurve)
|
||||
: base(duration) // 激活受控时间分段
|
||||
public PixelateEffect(float effectTime, float bottomX, float bottomY, AnimationCurve intensityCurve)
|
||||
: base(effectTime) // 激活受控时间分段
|
||||
{
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.bottomX = bottomX;
|
||||
this.bottomY = bottomY;
|
||||
this.intensityCurve = intensityCurve;
|
||||
@@ -77,3 +76,5 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ namespace Ichni.RhythmGame
|
||||
public class RadialBlurEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public int sampleLevel;
|
||||
public int sampleLevel;
|
||||
public float position; // 注:虽然新版可能未用此值或代表意义不同,为了兼容旧读写表保持传入
|
||||
public float fadeRange; // 注:同上,保留以使 ConvertToBM 存取数据兼容
|
||||
public float peakIntensity;
|
||||
@@ -18,10 +17,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public RadialBlurEffect(float duration, int sampleLevel, float position, float fadeRange, float peakIntensity, AnimationCurve intensityCurve)
|
||||
: base(duration) // 【修改】对接 EffectBase 含时控制
|
||||
public RadialBlurEffect(float effectTime, int sampleLevel, float position, float fadeRange, float peakIntensity, AnimationCurve intensityCurve)
|
||||
: base(effectTime) // 【修改】对接 EffectBase 含时控制
|
||||
{
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.sampleLevel = sampleLevel;
|
||||
this.position = position;
|
||||
this.fadeRange = fadeRange;
|
||||
@@ -82,3 +81,5 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,4 +43,4 @@ namespace Ichni.RhythmGame
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using SLSUtilities.Rendering.PostProcessing;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
{
|
||||
/// <summary>
|
||||
/// 控制 SpeedLines 后处理效果的特效脚本。
|
||||
/// 通过 intensityCurve + peakRemap 在持续时间内驱动 speedLinesRemap(数值越低效果越强)。
|
||||
/// </summary>
|
||||
public partial class SpeedLinesEffect : EffectBase
|
||||
{
|
||||
#region [运行时缓存数据] Property Caches
|
||||
// --- 时间控制 ---
|
||||
public AnimationCurve intensityCurve; // 0→1 映射到 remap:peakRemap→1f(1f=隐去,越小越强)
|
||||
|
||||
// --- Lines 设置 ---
|
||||
public Color color; // 包含 Alpha,Alpha 越大越不透明
|
||||
public float peakRemap; // 效果最强时 speedLinesRemap 的目标值(默认 0,越低越密集)
|
||||
public float speedLinesTiling; // 线条分块数量,默认 200
|
||||
public float speedLinesRadialScale; // 放射缩放,默认 0.1
|
||||
public float speedLinesPower; // 线条锐利度,默认 0
|
||||
public float speedLinesAnimation; // 移动速度,默认 3
|
||||
|
||||
// --- Radial Mask 设置 ---
|
||||
public float maskScale; // 遮罩比例,默认 1
|
||||
public float maskHardness; // 遮罩边缘硬度,默认 0
|
||||
public float maskPower; // 遮罩幂次,默认 5
|
||||
|
||||
private SpeedLines _speedLinesVolume;
|
||||
#endregion
|
||||
|
||||
#region [生成与初始化] Generation & Initialization
|
||||
public SpeedLinesEffect(float effectTime, AnimationCurve intensityCurve,
|
||||
Color color, float peakRemap = 0f,
|
||||
float speedLinesTiling = 200f, float speedLinesRadialScale = 0.1f,
|
||||
float speedLinesPower = 0f, float speedLinesAnimation = 3f,
|
||||
float maskScale = 1f, float maskHardness = 0f, float maskPower = 5f)
|
||||
: base(effectTime)
|
||||
{
|
||||
this.intensityCurve = intensityCurve;
|
||||
this.color = color;
|
||||
this.peakRemap = peakRemap;
|
||||
this.speedLinesTiling = speedLinesTiling;
|
||||
this.speedLinesRadialScale = speedLinesRadialScale;
|
||||
this.speedLinesPower = speedLinesPower;
|
||||
this.speedLinesAnimation = speedLinesAnimation;
|
||||
this.maskScale = maskScale;
|
||||
this.maskHardness = maskHardness;
|
||||
this.maskPower = maskPower;
|
||||
}
|
||||
|
||||
private void PrepareHandle()
|
||||
{
|
||||
if (_speedLinesVolume == null && PostProcessingManager.GlobalVolume != null)
|
||||
{
|
||||
PostProcessingManager.GlobalVolume.profile.TryGet(out _speedLinesVolume);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [处理与更新] Update & Processing
|
||||
public override void PreExecute()
|
||||
{
|
||||
PrepareHandle();
|
||||
if (_speedLinesVolume == null) return;
|
||||
|
||||
// 静态参数在预执行时写入一次
|
||||
_speedLinesVolume.color.value = color;
|
||||
_speedLinesVolume.speedLinesTiling.value = speedLinesTiling;
|
||||
_speedLinesVolume.speedLinesRadialScale.value = speedLinesRadialScale;
|
||||
_speedLinesVolume.speedLinesPower.value = speedLinesPower;
|
||||
_speedLinesVolume.speedLinesAnimation.value = speedLinesAnimation;
|
||||
_speedLinesVolume.maskScale.value = maskScale;
|
||||
_speedLinesVolume.maskHardness.value = maskHardness;
|
||||
_speedLinesVolume.maskPower.value = maskPower;
|
||||
}
|
||||
|
||||
public override void Execute()
|
||||
{
|
||||
if (_speedLinesVolume == null) return;
|
||||
|
||||
// intensityCurve 0→1,将 remap 从 1f(无效果)插值到 peakRemap(最强效果)
|
||||
float t = intensityCurve != null ? intensityCurve.Evaluate(effectProgressPercent) : effectProgressPercent;
|
||||
_speedLinesVolume.speedLinesRemap.value = Mathf.Lerp(1f, peakRemap, t);
|
||||
}
|
||||
|
||||
public override void Adjust() { ResetEffect(); }
|
||||
public override void Recover() { ResetEffect(); }
|
||||
public override void Disrupt() { ResetEffect(); }
|
||||
|
||||
private void ResetEffect()
|
||||
{
|
||||
if (_speedLinesVolume != null)
|
||||
_speedLinesVolume.speedLinesRemap.value = 1f; // Remap=1 时 IsActive() 返回 false
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6af39eb6164371e41b5998e29fa29f5f
|
||||
@@ -62,4 +62,4 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace Ichni.RhythmGame
|
||||
public class VignetteEffect : EffectBase
|
||||
{
|
||||
#region [效果参数] Effect Parameters
|
||||
public float duration;
|
||||
public float peak;
|
||||
public float smoothness;
|
||||
public Color color;
|
||||
@@ -17,10 +16,10 @@ namespace Ichni.RhythmGame
|
||||
#endregion
|
||||
|
||||
#region [初始化] Initialization
|
||||
public VignetteEffect(float duration, float peak, float smoothness, Color color, AnimationCurve intensityCurve)
|
||||
: base(duration)
|
||||
public VignetteEffect(float effectTime, float peak, float smoothness, Color color, AnimationCurve intensityCurve)
|
||||
: base(effectTime)
|
||||
{
|
||||
this.duration = duration;
|
||||
this.effectTime = effectTime;
|
||||
this.peak = peak;
|
||||
this.smoothness = smoothness;
|
||||
this.color = color;
|
||||
@@ -70,3 +69,5 @@ namespace Ichni.RhythmGame
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user