修复问题

This commit is contained in:
2026-07-28 04:33:07 +08:00
parent 6a4401b3f7
commit 114b90eaca
6 changed files with 1656 additions and 1648 deletions
File diff suppressed because it is too large Load Diff
@@ -230,7 +230,7 @@ namespace AibisDream
} }
/// <summary> /// <summary>
/// 等待表达流程就绪(开场表现 + 火山表达panel 播完 /// 等待表达流程就绪(粒子字入场完成即可;panel 动效可并行
/// </summary> /// </summary>
public IEnumerator WaitUntilExpressionFlowReady() public IEnumerator WaitUntilExpressionFlowReady()
{ {
@@ -29,7 +29,6 @@ namespace AibisDream.MiniGame.Language
private const int DeepLast = 14; private const int DeepLast = 14;
private const int UiFlashFirst = 15; private const int UiFlashFirst = 15;
private const int UiFlashLast = 29; private const int UiFlashLast = 29;
private const int StatusRevealFrame = 21;
private const int RingFirst = 30; private const int RingFirst = 30;
private const int RingLast = 40; private const int RingLast = 40;
private const int OutputFirst = 41; private const int OutputFirst = 41;
@@ -309,7 +308,9 @@ namespace AibisDream.MiniGame.Language
public IEnumerator PlayPanelAndWait() public IEnumerator PlayPanelAndWait()
{ {
int generation = BeginPlayback(); int generation = BeginPlayback();
yield return PlayRangeAndWait(UiFlashFirst, UiFlashLast, generation, StatusRevealFrame, ShowStatusAndObjective); // 状态/目标文字与 UI 闪动同步出现,避免先看一长段空动效再出字
ShowStatusAndObjective();
yield return PlayRangeAndWait(UiFlashFirst, UiFlashLast, generation);
if (generation != playbackGeneration) if (generation != playbackGeneration)
yield break; yield break;
@@ -532,7 +532,7 @@ namespace AibisDream.MiniGame.Language
} }
/// <summary> /// <summary>
/// 等待表达流程就绪(开场表现 + 火山表达panel 播完 /// 等待表达流程就绪(粒子字入场完成即可交互;panel 动效可并行、不阻塞
/// </summary> /// </summary>
public IEnumerator WaitUntilExpressionFlowReady() public IEnumerator WaitUntilExpressionFlowReady()
{ {
@@ -3162,6 +3162,13 @@ namespace AibisDream.MiniGame.Language
yield break; yield break;
} }
// panel / 状态文字与粒子入场并行:先出字,不把交互锁到整段 UI 动效播完
if (expressionPanelRoutine != null)
{
StopCoroutine(expressionPanelRoutine);
}
expressionPanelRoutine = StartCoroutine(PlayExpressionPanelThenReady());
float initialScale = Mathf.Max(0.05f, entranceInitialScale); float initialScale = Mathf.Max(0.05f, entranceInitialScale);
foreach (var candidate in particles) foreach (var candidate in particles)
@@ -3203,9 +3210,11 @@ namespace AibisDream.MiniGame.Language
maxCoreTime = Mathf.Max(maxCoreTime, delay + entranceCoreBurstDuration); maxCoreTime = Mathf.Max(maxCoreTime, delay + entranceCoreBurstDuration);
} }
float coreLead = 0f;
if (coreCandidates.Count > 0) if (coreCandidates.Count > 0)
{ {
yield return new WaitForSeconds(maxCoreTime * 0.6f); coreLead = maxCoreTime * 0.6f;
yield return new WaitForSeconds(coreLead);
} }
float cascadeDuration = 0f; float cascadeDuration = 0f;
@@ -3227,10 +3236,11 @@ namespace AibisDream.MiniGame.Language
cascadeDuration = Mathf.Max(cascadeDuration, delay + entranceCascadeDuration); cascadeDuration = Mathf.Max(cascadeDuration, delay + entranceCascadeDuration);
} }
float waitTime = Mathf.Max(maxCoreTime, cascadeDuration); // 只等 cascade / core 剩余时间,避免把已等过的 core 前半段再算一遍
if (waitTime > 0f) float remaining = Mathf.Max(maxCoreTime - coreLead, cascadeDuration);
if (remaining > 0f)
{ {
yield return new WaitForSeconds(waitTime + 0.2f); yield return new WaitForSeconds(remaining);
} }
foreach (var candidate in particles) foreach (var candidate in particles)
@@ -3241,18 +3251,13 @@ namespace AibisDream.MiniGame.Language
} }
entranceTargets.Clear(); entranceTargets.Clear();
// 粒子字已到位即可交互;panel 环光等动效继续播,不再挡输入
allowInput = true;
entranceRoutine = null; entranceRoutine = null;
// 开场表现完成,启动独立的火山表达panel协程(避免与 Entrance 耦合)
if (expressionPanelRoutine != null)
{
StopCoroutine(expressionPanelRoutine);
}
expressionPanelRoutine = StartCoroutine(PlayExpressionPanelThenReady());
} }
/// <summary> /// <summary>
/// 独立协程:播放火山表达panel,播完后将表达流程标记为就绪 /// 独立协程:播放火山表达 panel / 状态文字(与粒子入场并行,不负责解锁交互)
/// </summary> /// </summary>
private IEnumerator PlayExpressionPanelThenReady() private IEnumerator PlayExpressionPanelThenReady()
{ {
@@ -3267,8 +3272,11 @@ namespace AibisDream.MiniGame.Language
yield return screenPresentation.PlayPanelAndWait(); yield return screenPresentation.PlayPanelAndWait();
if (screenPresentation == null || if (screenPresentation == null ||
screenPresentation.State != ExpressionScreenPresentationController.ScreenState.Panel) screenPresentation.State != ExpressionScreenPresentationController.ScreenState.Panel)
{
expressionPanelRoutine = null;
yield break; yield break;
} }
}
else if (!string.IsNullOrEmpty(expressionPanelTimelineName) && TimelineCenter.Instance != null) else if (!string.IsNullOrEmpty(expressionPanelTimelineName) && TimelineCenter.Instance != null)
{ {
// 火山表达 panel timeline 驱动 panel1/2,播放前需先激活(若之前被 fade 过,需重置 alpha) // 火山表达 panel timeline 驱动 panel1/2,播放前需先激活(若之前被 fade 过,需重置 alpha)
@@ -3297,7 +3305,6 @@ namespace AibisDream.MiniGame.Language
Debug.LogWarning("[LanguageParticleManager] TimelineCenter.Instance 为空,无法播放火山表达panel"); Debug.LogWarning("[LanguageParticleManager] TimelineCenter.Instance 为空,无法播放火山表达panel");
} }
allowInput = true;
expressionPanelRoutine = null; expressionPanelRoutine = null;
} }
@@ -27,8 +27,8 @@ namespace AibisDream.MiniGame.Language
} }
/// <summary> /// <summary>
/// 启动表达粒子系统(在打开视图后调用),等待火山表达panel播完再返回 /// 启动表达粒子系统(在打开视图后调用),等粒子字入场完成即可返回(可交互);panel 动效并行不阻塞
/// 流程:若有上一轮则先淡出字与连线 → 再淡入火山释放 log → 再启动新一轮并等表达 panel 就绪。 /// 流程:若有上一轮则先淡出字与连线 → 再淡入火山释放 log → 再启动新一轮并等粒子就绪。
/// 注意:Yarn Spinner 2.x 对同名 <see cref="YarnCommand"/> 重载支持不可靠,只保留一个注册入口,用可选参数区分 3/4 参调用。 /// 注意:Yarn Spinner 2.x 对同名 <see cref="YarnCommand"/> 重载支持不可靠,只保留一个注册入口,用可选参数区分 3/4 参调用。
/// <<start_expression "哈哈|嘿嘿|呵呵" "我很害怕" "ExpressionCompleted">> /// <<start_expression "哈哈|嘿嘿|呵呵" "我很害怕" "ExpressionCompleted">>
/// <<start_expression "哈哈|嘿嘿|呵呵" "我很害怕" "ExpressionCompleted" 24>> /// <<start_expression "哈哈|嘿嘿|呵呵" "我很害怕" "ExpressionCompleted" 24>>
+1 -1
View File
@@ -133,7 +133,7 @@ PlayerSettings:
vulkanEnableLateAcquireNextImage: 0 vulkanEnableLateAcquireNextImage: 0
vulkanEnableCommandBufferRecycling: 1 vulkanEnableCommandBufferRecycling: 1
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
bundleVersion: 0.6.1.5-20260728-031155 bundleVersion: 0.6.1.9-20260728-041713
preloadedAssets: preloadedAssets:
- {fileID: 11400000, guid: 0fb2bc2476953fc43a74f0ab8879077c, type: 2} - {fileID: 11400000, guid: 0fb2bc2476953fc43a74f0ab8879077c, type: 2}
metroInputSource: 0 metroInputSource: 0