Merge remote-tracking branch 'origin/保底全流程包' into develop

This commit is contained in:
2025-07-24 17:12:36 +08:00
222 changed files with 34030 additions and 9870 deletions
@@ -162,9 +162,6 @@ namespace AibisDream.FixSystem
DialogController.Instance?.StartDialogNode($"{data.moduleName}CutDown");
EnumEventSystem.Global.Send(EventEnum.CutEnd);
Destroy(gameObject);
DialogController.Instance?.StartDialogNode($"{data.moduleName}CutDown");
EnumEventSystem.Global.Send(EventEnum.CutEnd);
Destroy(gameObject);
}
public void SetCutTextVisible(bool visible)
@@ -87,10 +87,14 @@ namespace AibisDream.FixSystem
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
{
Debug.Log($"[ScreenSystem] ShowLine - 原始文本: '{dialogLine}'");
if (string.IsNullOrWhiteSpace(dialogLine))
{
dialogLine = " ";
dialogLine = " ";
// Debug.Log("[ScreenSystem] ShowLine - 空文本被替换为空格");
}
ShowTitle(character.GetActorName());
// 生成新文本组件
var textItem = Instantiate(_textItemPrefab, textRoot);
@@ -103,20 +107,29 @@ namespace AibisDream.FixSystem
Destroy(_lineQueue.Dequeue().gameObject);
}
_lineQueue.Enqueue(textItemTypewriter);
// 播放文本
textItemTypewriter.ShowText(dialogLine);
textItemTypewriter.onTextShowed.AddListener(() => AfterLineShown(textItemTypewriter, nextStep));
// 强制更新布局
LayoutRebuilder.ForceRebuildLayoutImmediate(textRoot);
Debug.Log($"[ScreenSystem] ShowLine - 文本播放开始,nextStep是否为null: {nextStep == null}");
}
private void AfterLineShown(TypewriterByCharacter typewriter, Action nextStop)
{
Debug.Log("[ScreenSystem] AfterLineShown - 文本显示完成");
Debug.Log($"[ScreenSystem] AfterLineShown - nextStop是否为null: {nextStop == null}");
EnumEventSystem.Global.Send(DialogEventEnum.LineShown);
ActionKit.Delay(0.3f, () =>
ActionKit.Delay(0.1f, () =>
{
Debug.Log("[ScreenSystem] AfterLineShown - 延迟结束,调用回调");
EnumEventSystem.Global.Send(DialogEventEnum.LineEnd);
nextStop.Invoke();
Debug.Log("[ScreenSystem] AfterLineShown - 回调调用完成");
}).StartGlobal();
typewriter.onTextShowed.RemoveAllListeners();
}