마지막씬 보이스클립
This commit is contained in:
@@ -19,7 +19,7 @@ public class DialogNode : ScriptableObject
|
||||
[TextArea(2,5)] public string TalkText;
|
||||
public GestureData Gesture;
|
||||
public ExpressionData Expression;
|
||||
public VoiceClip Voice;
|
||||
public AudioClip Voice;
|
||||
public float LineDuration; //자동 넘김 시간
|
||||
//LineDuration=0 → 플레이어 입력 대기 (수동)
|
||||
//Voice 있음 → 클립 길이만큼 대기
|
||||
|
||||
@@ -649,8 +649,8 @@ private async Awaitable<bool> PlayNode(DialogNode node)
|
||||
if (node.Voice != null && node.Speaker != null)
|
||||
{
|
||||
var voiceObj = CharacterVoiceObject.Find(node.Speaker);
|
||||
if (voiceObj != null && node.Voice.Clip != null)
|
||||
voiceObj.Play(node.Voice.Clip);
|
||||
if (voiceObj != null)
|
||||
voiceObj.Play(node.Voice);
|
||||
}
|
||||
|
||||
// 플레이어 향해 회전
|
||||
@@ -730,8 +730,8 @@ private async Awaitable<bool> PlayNode(DialogNode node)
|
||||
}
|
||||
else
|
||||
{
|
||||
float wait = (node.Voice != null && node.Voice.Clip != null)
|
||||
? node.Voice.Clip.length
|
||||
float wait = node.Voice != null
|
||||
? node.Voice.length
|
||||
: node.LineDuration;
|
||||
|
||||
if (wait > 0f)
|
||||
@@ -852,8 +852,8 @@ private async Awaitable<bool> WaitAdvanceOrDivert(DialogNode node)
|
||||
}
|
||||
else
|
||||
{
|
||||
float wait = (node.Voice != null && node.Voice.Clip != null)
|
||||
? node.Voice.Clip.length
|
||||
float wait = node.Voice != null
|
||||
? node.Voice.length
|
||||
: node.LineDuration;
|
||||
if (wait > 0f) { waitForInput = false; timeoutSeconds = wait; }
|
||||
else { waitForInput = true; timeoutSeconds = -1f; }
|
||||
|
||||
@@ -124,7 +124,7 @@ public override void OnImportAsset(AssetImportContext ctx)
|
||||
dn.TalkText = GetInputPortValue<DialogText>(gn.GetInputPortByName(DialogLineNode.PORT_TALK)).Value;
|
||||
dn.Gesture = GetInputPortValue<GestureData>(gn.GetInputPortByName(DialogLineNode.PORT_GESTURE));
|
||||
dn.Expression = GetInputPortValue<ExpressionData>(gn.GetInputPortByName(DialogLineNode.PORT_EXPRESSION));
|
||||
dn.Voice = GetInputPortValue<VoiceClip>(gn.GetInputPortByName(DialogLineNode.PORT_VOICE));
|
||||
dn.Voice = GetInputPortValue<AudioClip>(gn.GetInputPortByName(DialogLineNode.PORT_VOICE));
|
||||
dn.Bgm = GetInputPortValue<AudioClip>(gn.GetInputPortByName(DialogLineNode.PORT_BGM));
|
||||
dn.Vfx = GetInputPortValue<GameObject>(gn.GetInputPortByName(DialogLineNode.PORT_VFX));
|
||||
dn.LineDuration = GetInputPortValue<float>(gn.GetInputPortByName(DialogLineNode.PORT_DURATION));
|
||||
|
||||
@@ -88,7 +88,7 @@ protected override void OnDefinePorts(IPortDefinitionContext context)
|
||||
context.AddInputPort<DialogText>(PORT_TALK).WithDisplayName("Talk Text").Build();
|
||||
context.AddInputPort<GestureData>(PORT_GESTURE).WithDisplayName("Gesture").Build();
|
||||
context.AddInputPort<ExpressionData>(PORT_EXPRESSION).WithDisplayName("Expression").Build();
|
||||
context.AddInputPort<VoiceClip>(PORT_VOICE).WithDisplayName("Voice").Build();
|
||||
context.AddInputPort<AudioClip>(PORT_VOICE).WithDisplayName("Voice").Build();
|
||||
context.AddInputPort<AudioClip>(PORT_BGM).WithDisplayName("BGM")
|
||||
.WithTooltip("있으면 이 대사부터 전용 BGM 재생, 비우면 기본 BGM으로 복귀").Build();
|
||||
context.AddInputPort<GameObject>(PORT_VFX).WithDisplayName("VFX Prefab")
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(menuName = "Communication/VoiceClip")]
|
||||
public class VoiceClip : ScriptableObject
|
||||
{
|
||||
public string VoiceCode; //해당 음성 고유코드
|
||||
public AudioClip Clip;
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc306ebaeba77b94dbb631e9fdc0e864
|
||||
Reference in New Issue
Block a user