fix/dev-room #5

Merged
Antoine2507 merged 31 commits from fix/dev-room into Prototype 2026-03-17 10:49:58 +01:00
Showing only changes of commit 2dbe21ec62 - Show all commits

View File

@@ -144,12 +144,13 @@ 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;
int visibleChars = Mathf.Clamp(Mathf.FloorToInt(typeTime * typewriterCharsPerSecond), 0, totalChars);
visibleChars = Mathf.Clamp(Mathf.FloorToInt(typeTime * typewriterCharsPerSecond), 0, totalChars);
m_currentText = line.text.Substring(0, visibleChars);
yield return null;
}