fix: sync the prototype

This commit is contained in:
Pierre Ryssen
2026-03-30 18:01:33 +02:00
parent 175162fccf
commit fcb0f813dd
19 changed files with 156845 additions and 14766 deletions

View File

@@ -144,13 +144,12 @@ public class SubtitleSequencePlayer : MonoBehaviour
float typeTime = 0f;
int totalChars = line.text.Length;
int visibleChars = 0;
if (typewriterCharsPerSecond > 0f)
{
while (m_currentText.Length < totalChars)
{
typeTime += Time.deltaTime;
visibleChars = Mathf.Clamp(Mathf.FloorToInt(typeTime * typewriterCharsPerSecond), 0, totalChars);
int visibleChars = Mathf.Clamp(Mathf.FloorToInt(typeTime * typewriterCharsPerSecond), 0, totalChars);
m_currentText = line.text.Substring(0, visibleChars);
yield return null;
}