调整Dream终端typewriter速度
This commit is contained in:
@@ -88,6 +88,14 @@ namespace AibisDream.UI
|
||||
[SerializeField] private string promptString = "bit seaExists = ";
|
||||
[SerializeField] private string onCompleteNode = "苏醒";
|
||||
|
||||
[Header("速度(可调)")]
|
||||
[Tooltip("打字机每字延迟(秒),越小越快")]
|
||||
[Range(0.005f, 0.15f)]
|
||||
[SerializeField] private float typewriterCharDelay = 0.025f;
|
||||
[Tooltip("启动日志整体速度倍率,1=正常,2=两倍快,0.5=半速")]
|
||||
[Range(0.25f, 4f)]
|
||||
[SerializeField] private float bootSpeedMultiplier = 1f;
|
||||
|
||||
[Header("启动日志")]
|
||||
[SerializeField] private List<BootLogEntry> bootSequence = new()
|
||||
{
|
||||
@@ -434,7 +442,7 @@ namespace AibisDream.UI
|
||||
string cursorHex = renderRow.showCursor
|
||||
? colorHex
|
||||
: colorHex[..6] + "00";
|
||||
displayText += $"<color=#{cursorHex}>\U+2590</color>";
|
||||
displayText += $"<color=#{cursorHex}>{'\u2588'}</color>";
|
||||
}
|
||||
|
||||
DrawTextWithGhost(textPos, displayText, c);
|
||||
@@ -705,19 +713,21 @@ namespace AibisDream.UI
|
||||
private IEnumerator RunBootSequence()
|
||||
{
|
||||
_phase = TerminalPhase.BootSequence;
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
float speed = Mathf.Max(0.25f, bootSpeedMultiplier);
|
||||
yield return new WaitForSeconds(0.3f / speed);
|
||||
|
||||
foreach (var entry in bootSequence)
|
||||
{
|
||||
Color c = StyleToColor(entry.style);
|
||||
_typewriterCoroutine = StartCoroutine(TypewriterLine(entry.text, c));
|
||||
float charDelay = typewriterCharDelay / speed;
|
||||
_typewriterCoroutine = StartCoroutine(TypewriterLine(entry.text, c, charDelay));
|
||||
yield return WaitForTypewriter();
|
||||
|
||||
if (entry.delayAfter > 0f)
|
||||
yield return new WaitForSeconds(entry.delayAfter);
|
||||
yield return new WaitForSeconds(entry.delayAfter / speed);
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(0.3f);
|
||||
yield return new WaitForSeconds(0.3f / speed);
|
||||
EnterInputPhase();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user