Initial commit: Unity 프로젝트 셋업 + 다이얼로그 시스템 이전
This commit is contained in:
35
Assets/02_Scripts/Communication/Dialog/DialogNode.cs
Normal file
35
Assets/02_Scripts/Communication/Dialog/DialogNode.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(menuName = "Communication/Dialog Node")]
|
||||
public class DialogNode : ScriptableObject
|
||||
{
|
||||
[Header("Speaker")]
|
||||
public CharacterData Speaker;
|
||||
|
||||
[Header("Content")]
|
||||
[TextArea(2,5)] public string TalkText;
|
||||
public GestureData Gesture;
|
||||
public ExpressionData Expression;
|
||||
public VoiceClip Voice;
|
||||
public float LineDuration; //자동 넘김 시간
|
||||
//LineDuration=0 → 플레이어 입력 대기 (수동)
|
||||
//Voice 있음 → 클립 길이만큼 대기
|
||||
//Voice 없음 → LineDuration 대기
|
||||
|
||||
|
||||
[Header("Behavior")]
|
||||
public bool LookAtPlayer;
|
||||
public bool WaitForInput; // true면 LineDuration 무시하고 B버튼(OnDialogNext) 입력까지 대기
|
||||
|
||||
[Header("Flow")]
|
||||
public DialogNode Next; // 선택지 없을 때 자동으로 갈 노드
|
||||
public List<DialogChoice> Choices; // 있으면 플레이어 선택 대기
|
||||
|
||||
[Header("ChoiceQuestion")]
|
||||
[TextArea(2,5)] public string ChoiceQuestion;
|
||||
|
||||
[Header("Event")]
|
||||
public string EventKey; // 비어있지 않으면 이 노드가 재생될 때 DialogPlayer가 같은 Key의 이벤트를 호출
|
||||
}
|
||||
Reference in New Issue
Block a user