佩佩2问题修改
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user