fix(heatmap): 优化温度过渡并修复热点尺寸
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -231,13 +231,32 @@ namespace AibisDream.FixSystem
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置发热
|
||||
/// 设置发热。逻辑档位立即更新;视觉温度按热力图是否打开决定硬切/平滑,
|
||||
/// 且降温动画已落到冷态附近时,Yarn 的 SetHeat(0) 不再把 0.5 硬切成 0。
|
||||
/// </summary>
|
||||
public void SetHeat(int targetHeatValue)
|
||||
{
|
||||
HeatValue = targetHeatValue;
|
||||
|
||||
heatMapController?.SetTemptureDirect(HeatValue);
|
||||
if (heatMapController == null)
|
||||
return;
|
||||
|
||||
// 降温协程已把视觉温度收到 ~0.5,随后对话里的 SetHeat(0) 只清逻辑,不冲掉视觉。
|
||||
if (targetHeatValue <= 0 && heatMapController.Tempture <= 0.55f)
|
||||
return;
|
||||
|
||||
bool mapVisible = heatMapController.IsHeatMapVisible;
|
||||
if (mapVisible)
|
||||
{
|
||||
// 热力图已打开:升温/降温都走短 tween,避免档位硬切
|
||||
float duration = targetHeatValue <= 0 ? 0.6f : 1.0f;
|
||||
heatMapController.SetTemptureSmooth(targetHeatValue, duration);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 面板未显示:直接落到目标,打开时不会再闪一下
|
||||
heatMapController.SetTemptureDirect(targetHeatValue);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowHeatMap()
|
||||
|
||||
Reference in New Issue
Block a user