Files
Cielonos/Assets/Scripts/SLSUtilities/Feedback/Base/FeedbackTrack.cs
SoulliesOfficial 41140a2017 新Feedback系统
2026-04-12 02:11:15 -04:00

47 lines
1.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using Sirenix.OdinInspector;
namespace SLSUtilities.Feedback
{
/// <summary>
/// 一条反馈轨道,包含按时间排列的 Clip 序列。
/// 多个 Track 天然并行播放Track 内的 Clip 按时间顺序排列,不重叠。
/// </summary>
[Serializable]
public class FeedbackTrack
{
/// <summary>
/// 轨道名称,用于调试和 Inspector 显示。
/// </summary>
[LabelText("Track Name")]
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;
}
}