59 lines
1.7 KiB
C#
59 lines
1.7 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Linq;
|
||
using Sirenix.OdinInspector;
|
||
|
||
namespace SLSUtilities.Feedback
|
||
{
|
||
/// <summary>
|
||
/// 一条反馈轨道,包含按时间排列的 Clip 序列。
|
||
/// 多个 Track 天然并行播放,Track 内的 Clip 按时间顺序排列,不重叠。
|
||
/// </summary>
|
||
[Serializable]
|
||
public partial class FeedbackTrack
|
||
{
|
||
/// <summary>
|
||
/// 轨道名称,用于调试和 Inspector 显示。
|
||
/// </summary>
|
||
[LabelText("Track Name")]
|
||
[ValueDropdown("GetTrackNamesList")]
|
||
public string trackName = "New Track";
|
||
|
||
/// <summary>
|
||
/// 静音此轨道,播放时跳过。
|
||
/// </summary>
|
||
[HorizontalGroup("Flags", Width = 60)]
|
||
[LabelWidth(40)]
|
||
public bool mute;
|
||
|
||
/// <summary>
|
||
/// 独奏此轨道,仅播放标记为 Solo 的轨道。
|
||
/// </summary>
|
||
[HorizontalGroup("Flags", Width = 50)]
|
||
[LabelWidth(35)]
|
||
public bool solo;
|
||
|
||
/// <summary>
|
||
/// 轨道上的片段列表。
|
||
/// </summary>
|
||
[ListDrawerSettings(ShowFoldout = true)]
|
||
public List<FeedbackClip> clips = new List<FeedbackClip>();
|
||
|
||
/// <summary>
|
||
/// 该轨道的总时长,取所有 Clip 中最大的 EndTime。
|
||
/// </summary>
|
||
public float TotalDuration => clips.Count > 0 ? clips.Max(c => c.EndTime) : 0f;
|
||
}
|
||
|
||
public partial class FeedbackTrack
|
||
{
|
||
private List<string> GetTrackNamesList()
|
||
{
|
||
return new List<string>()
|
||
{
|
||
"Camera", "Time", "Postprocessing", "Audio"
|
||
};
|
||
}
|
||
}
|
||
}
|