本地化问题修复

This commit is contained in:
2025-05-14 21:12:49 +08:00
parent a9dabe26c7
commit 5f8af70d0a
5 changed files with 782 additions and 737 deletions
@@ -46,7 +46,7 @@ namespace AibisDream.FixSystem
{
_textScreen = transform.Find("旋转屏幕");
_imageMaterial = screenImage.material;
_generator = new TextGenerator();
_generationSettings = new TextGenerationSettings
{
@@ -102,7 +102,14 @@ namespace AibisDream.FixSystem
if (cutLineNum <= text.textInfo.lineCount)
{
var lastCharIndex = text.textInfo.lineInfo[cutLineNum - 1].lastCharacterIndex;
oldText = text.text[lastCharIndex..];
if (lastCharIndex + 1 < text.text.Length)
{
oldText = text.text.Substring(lastCharIndex + 1);
}
else
{
oldText = string.Empty;
}
}
}
else
@@ -112,7 +119,7 @@ namespace AibisDream.FixSystem
var targetLength = oldText.Length + targetText.Length;
// 逐个字符添加
yield return DOTween.To(() => oldText.Length, x => UpdateText(x, targetText, oldText), targetLength,
targetText.Length * typeSpeed).WaitForCompletion();
@@ -121,7 +128,7 @@ namespace AibisDream.FixSystem
EnumEventSystem.Global.Send(DialogEventEnum.LineEnd);
_nextStep.Invoke();
}
private int EstimateLineNum(string str)
{
var height = _generator.GetPreferredHeight(str, _generationSettings);
@@ -211,7 +218,7 @@ namespace AibisDream.FixSystem
#region
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId ,bool isAutoSkip = false)
public void ShowLine(string dialogLine, CharacterVo character, Action nextStep, string lineId, bool isAutoSkip = false)
{
ShowTitle(character.GetActorName());
StartCoroutine(ShowText(dialogLine));