Files
plugin-library/Assets/10.StoryEditor/RunTime/Player/Node/ScriptParagraphNodePlayer.cs

32 lines
869 B
C#
Raw Normal View History

using Cysharp.Threading.Tasks;
namespace Stary.Evo.StoryEditor
{
public class ScriptParagraphNodePlayer : FlowNodePlayer
{
public new ScriptParagraphNodeData Data;
/// <summary>
/// 字幕路径
/// </summary>
public ResourcePathData CaptionPath;
/// <summary>
/// 语音路径
/// </summary>
public ResourcePathData AudioPath;
public ScriptParagraphNodePlayer(GraphPlayer graph, ScriptParagraphNodeData data) : base(graph, data)
{
Data = data;
CaptionPath = data.captionPath;
AudioPath = data.audioPath;
}
public override async UniTask Execute()
{
Init();
await ScriptPlayer.PlayScriptPara(this, Graph.Cts.Token);
await base.Execute();
}
}
}