36 lines
1003 B
C#
36 lines
1003 B
C#
using System;
|
|
using AibisDream.Utility;
|
|
using Yarn.Unity;
|
|
|
|
namespace AibisDream
|
|
{
|
|
public class AudioView : DialogueViewBase
|
|
{
|
|
public override void RunLine(LocalizedLine dialogueLine, Action onDialogueLineFinished)
|
|
{
|
|
var voicePath = dialogueLine.GetCharacterVo().voicePath;
|
|
if (!string.IsNullOrWhiteSpace(voicePath))
|
|
{
|
|
AudioManager.Instance.RandomPlayVoice(voicePath);
|
|
}
|
|
base.RunLine(dialogueLine, onDialogueLineFinished);
|
|
}
|
|
|
|
public override void InterruptLine(LocalizedLine dialogueLine, Action onDialogueLineFinished)
|
|
{
|
|
base.InterruptLine(dialogueLine, onDialogueLineFinished);
|
|
}
|
|
|
|
public override void DismissLine(Action onDismissalComplete)
|
|
{
|
|
base.DismissLine(onDismissalComplete);
|
|
}
|
|
|
|
public override void UserRequestedViewAdvancement()
|
|
{
|
|
AudioManager.Instance.StopVoice();
|
|
}
|
|
}
|
|
}
|
|
|