佩佩2问题修改

This commit is contained in:
2025-06-16 20:53:23 +08:00
parent b3d75fe056
commit 60b08a5167
21 changed files with 4019 additions and 3991 deletions
@@ -103,9 +103,7 @@ namespace AibisDream.FixSystem
Destroy(_lineQueue.Dequeue().gameObject);
}
_lineQueue.Enqueue(textItemTypewriter);
// 播放文本
Debug.Log($"Screen {dialogLine}");
textItemTypewriter.ShowText(dialogLine);
textItemTypewriter.onTextShowed.AddListener(() => AfterLineShown(textItemTypewriter, nextStep));
// 强制更新布局
@@ -114,11 +112,9 @@ namespace AibisDream.FixSystem
private void AfterLineShown(TypewriterByCharacter typewriter, Action nextStop)
{
Debug.Log("Screen Shown");
EnumEventSystem.Global.Send(DialogEventEnum.LineShown);
ActionKit.Delay(0.3f, () =>
{
Debug.Log("Screen Shown Next");
EnumEventSystem.Global.Send(DialogEventEnum.LineEnd);
nextStop.Invoke();
}).StartGlobal();
@@ -157,12 +153,12 @@ namespace AibisDream.FixSystem
{
textForEstimation.text = text;
textForEstimation.ForceMeshUpdate();
return textForEstimation.textInfo.linkCount;
return textForEstimation.textInfo.lineCount;
}
private int CalcTotalLineNum()
{
return _lineQueue.Select(x => x.GetComponent<TMP_Text>().textInfo.linkCount).Sum();
return _lineQueue.Select(x => x.GetComponent<TMP_Text>().textInfo.lineCount).Sum();
}
}
}