타이핑 연출

This commit is contained in:
2026-07-30 11:28:35 +09:00
parent 28f014152c
commit 073567c652
14 changed files with 343 additions and 19 deletions

View File

@@ -0,0 +1,33 @@
using UnityEngine;
// 타이핑 연출 프리셋 — 속도 / 문장부호 대기 / 글자 색 / 타이핑되는 동안 깔리는 사운드.
//
// 대사 노드(DialogNode.Typewriter)에 물리면 그 대사만 이 연출로 나온다. 비우면 DialogHud의 기본 스타일.
// 톤이 다른 연출이 필요하면 에셋을 하나 더 만들면 된다 — 예를 들어 장소 이름 표시는
// "느린 속도 + 다른 색 + 다른 사운드"인데, 그게 곧 이 에셋 하나다.
[CreateAssetMenu(menuName = "Communication/Typewriter Style")]
public class TypewriterStyle : ScriptableObject
{
[Header("Speed")]
[Tooltip("초당 드러나는 글자 수")]
[Min(1f)] public float CharsPerSecond = 30f;
[Tooltip("쉼표류(, 、 ·) 뒤에 추가로 쉬는 시간(초)")]
[Min(0f)] public float CommaPause = 0.12f;
[Tooltip("문장 끝(. ! ? … 。) 뒤에 추가로 쉬는 시간(초)")]
[Min(0f)] public float SentencePause = 0.3f;
[Header("Color")]
[Tooltip("켜면 글자 색을 아래 색으로 덮는다. 끄면 USS에 지정된 색 그대로")]
public bool OverrideColor;
public Color TextColor = Color.white;
[Header("Sound")]
[Tooltip("타이핑되는 동안 루프로 재생할 사운드. 비우면 무음. " +
"글자마다 개별 재생이 아니라, 타이핑이 끝나거나 스킵되면 멈춘다")]
public AudioClip TypingSound;
[Range(0f, 1f)] public float TypingVolume = 1f;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 3aadea59345839a40b38e471686b4d1f