新Feedback系统

This commit is contained in:
SoulliesOfficial
2026-04-12 02:11:15 -04:00
parent f26f9fd374
commit 41140a2017
171 changed files with 296190 additions and 219527 deletions

View File

@@ -96,34 +96,34 @@ namespace MoreMountains.FeedbacksForThirdParty.Cielonos
{
if (TimeManager.Instance == null) return;
if (_activeShakes.Count == 0)
{
ActiveShakesCount = 0;
return;
}
float finalGlobal = 1f;
float finalPlayer = 1f;
float finalAllied = 1f;
float finalNonPlayer = 1f;
float finalEnemy = 1f;
if (_activeShakes.Count > 0)
for (int i = _activeShakes.Count - 1; i >= 0; i--)
{
for (int i = _activeShakes.Count - 1; i >= 0; i--)
var shake = _activeShakes[i];
float deltaTime = (shake.TimescaleMode == TimescaleModes.Scaled) ? Time.deltaTime : Time.unscaledDeltaTime;
shake.Timer += deltaTime;
ApplyChannel(shake.Global, ref finalGlobal, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.Player, ref finalPlayer, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.Allied, ref finalAllied, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.NonPlayer, ref finalNonPlayer, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.Enemy, ref finalEnemy, shake.Timer, shake.IntensityMultiplier);
if (shake.Timer >= shake.TotalDuration)
{
var shake = _activeShakes[i];
// 更新时间
float deltaTime = (shake.TimescaleMode == TimescaleModes.Scaled) ? Time.deltaTime : Time.unscaledDeltaTime;
shake.Timer += deltaTime;
// 计算每个通道的贡献 (注意:不再传入统一的 Progress而是传入当前 Timer)
ApplyChannel(shake.Global, ref finalGlobal, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.Player, ref finalPlayer, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.Allied, ref finalAllied, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.NonPlayer, ref finalNonPlayer, shake.Timer, shake.IntensityMultiplier);
ApplyChannel(shake.Enemy, ref finalEnemy, shake.Timer, shake.IntensityMultiplier);
// 移除过期 (使用 TotalDuration)
if (shake.Timer >= shake.TotalDuration)
{
_activeShakes.RemoveAt(i);
}
_activeShakes.RemoveAt(i);
}
}