1
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using Cysharp.Threading.Tasks;
|
||||
|
||||
namespace Net.Project.B.Dialogue
|
||||
{
|
||||
@@ -33,7 +35,15 @@ namespace Net.Project.B.Dialogue
|
||||
/// 等待对话完成
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
TaskAwaiter GetAwaiter();
|
||||
CancellationTokenAwaitable.Awaiter GetAwaiter();
|
||||
/// <summary>
|
||||
/// 跳过对话
|
||||
/// </summary>
|
||||
public CancellationTokenSource CancellationTokenSource { get; set; }
|
||||
/// <summary>
|
||||
/// 元对象
|
||||
/// </summary>
|
||||
public object MetaObject { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 对话选择
|
||||
@@ -64,10 +74,9 @@ namespace Net.Project.B.Dialogue
|
||||
public int ActorIdentity { get; set; }
|
||||
public string Text { get; set; }
|
||||
public string VoicePath { get; set; }
|
||||
public TaskAwaiter GetAwaiter()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
public CancellationTokenAwaitable.Awaiter GetAwaiter() => CancellationTokenSource.Token.WaitUntilCanceled().GetAwaiter();
|
||||
public CancellationTokenSource CancellationTokenSource { get; set; }
|
||||
public object MetaObject { get; set; }
|
||||
}
|
||||
public struct DialogueChoice:IDialogueChoice
|
||||
{
|
||||
|
Reference in New Issue
Block a user