79 lines
2.1 KiB
C#
79 lines
2.1 KiB
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Runtime.CompilerServices;
|
||
|
|
||
|
namespace Net.Project.B.Dialogue
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 对话数据
|
||
|
/// </summary>
|
||
|
public interface IDialogueData
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 唯一对话ID
|
||
|
/// </summary>
|
||
|
public int Identity { get; set; }
|
||
|
/// <summary>
|
||
|
/// 通道ID,用于区分不同的对话
|
||
|
/// </summary>
|
||
|
public int Channel { get; }
|
||
|
/// <summary>
|
||
|
/// 演员ID,谁是说话的人
|
||
|
/// </summary>
|
||
|
public int ActorIdentity { get; }
|
||
|
/// <summary>
|
||
|
/// 文本
|
||
|
/// </summary>
|
||
|
public string Text { get; }
|
||
|
/// <summary>
|
||
|
/// 语音路径
|
||
|
/// </summary>
|
||
|
public string VoicePath { get; }
|
||
|
/// <summary>
|
||
|
/// 等待对话完成
|
||
|
/// </summary>
|
||
|
/// <returns></returns>
|
||
|
TaskAwaiter GetAwaiter();
|
||
|
}
|
||
|
/// <summary>
|
||
|
/// 对话选择
|
||
|
/// </summary>
|
||
|
public interface IDialogueChoice
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 索引
|
||
|
/// </summary>
|
||
|
public int Index { get; }
|
||
|
/// <summary>
|
||
|
/// 文本
|
||
|
/// </summary>
|
||
|
public string Text { get; }
|
||
|
/// <summary>
|
||
|
/// 是否可选
|
||
|
/// </summary>
|
||
|
public bool Enabled { get; }
|
||
|
/// <summary>
|
||
|
/// 备注,例如:选择这个选项会触发什么事件,不可选的原因等
|
||
|
/// </summary>
|
||
|
public string Remark { get; }
|
||
|
}
|
||
|
public struct DialogueData:IDialogueData
|
||
|
{
|
||
|
public int Identity { get; set; }
|
||
|
public int Channel { get; set; }
|
||
|
public int ActorIdentity { get; set; }
|
||
|
public string Text { get; set; }
|
||
|
public string VoicePath { get; set; }
|
||
|
public TaskAwaiter GetAwaiter()
|
||
|
{
|
||
|
throw new System.NotImplementedException();
|
||
|
}
|
||
|
}
|
||
|
public struct DialogueChoice:IDialogueChoice
|
||
|
{
|
||
|
public int Index { get; set; }
|
||
|
public string Text { get; set; }
|
||
|
public bool Enabled { get; set; }
|
||
|
public string Remark { get; set; }
|
||
|
}
|
||
|
}
|