66 lines
2.9 KiB
C#
66 lines
2.9 KiB
C#
|
|
#if UNITY_EDITOR
|
|||
|
|
using System.Text;
|
|||
|
|
using UnityEditor;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
namespace SLSUtilities.FunctionalAnimation
|
|||
|
|
{
|
|||
|
|
public class FuncAnimInteractionsGuideWindow : EditorWindow
|
|||
|
|
{
|
|||
|
|
private Vector2 scrollPosition;
|
|||
|
|
|
|||
|
|
public static void ShowWindow()
|
|||
|
|
{
|
|||
|
|
FuncAnimInteractionsGuideWindow window =
|
|||
|
|
GetWindow<FuncAnimInteractionsGuideWindow>(true, "FuncAnim Interactions 使用说明");
|
|||
|
|
window.minSize = new Vector2(560f, 360f);
|
|||
|
|
window.Show();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private void OnGUI()
|
|||
|
|
{
|
|||
|
|
scrollPosition = EditorGUILayout.BeginScrollView(scrollPosition);
|
|||
|
|
|
|||
|
|
EditorGUILayout.LabelField("FuncAnim Interactions 使用说明", EditorStyles.boldLabel);
|
|||
|
|
EditorGUILayout.Space(8f);
|
|||
|
|
|
|||
|
|
DrawSection(
|
|||
|
|
FuncAnimInteractionKeys.SpecifiedActionDisruption,
|
|||
|
|
"用途:限制当前动作只能在指定的 Custom Interval 内被特定动作打断。",
|
|||
|
|
"配置:在当前 FuncAnimData 的 intervals 中添加 Custom interval,intervalName 必须为 SpecifiedActionDisruption;然后在 interactions 中添加 Key = SpecifiedActionDisruption。",
|
|||
|
|
"Values:填写允许打断当前动作的新动作 animationName。",
|
|||
|
|
"运行时效果:如果新动作在 Values 中,只有当前时间处于 SpecifiedActionDisruption interval 时才能播放。");
|
|||
|
|
|
|||
|
|
DrawSection(
|
|||
|
|
FuncAnimInteractionKeys.ExemptedPayloadAnimPairOnSelfOverrideDisruption,
|
|||
|
|
"用途:当前动作被 SelfOverride 切换到指定动作时,跳过指定的 disruption payload。",
|
|||
|
|
"Values 格式:PayloadEventName:TargetAnimationName。",
|
|||
|
|
"PayloadEventName 是当前动作 disruptionEvents 中要跳过的 payload eventName。如果 payload 没有 eventName,也可以填写 payload 类型显示名;TargetAnimationName 是即将播放的新动作 animationName。",
|
|||
|
|
"可以使用 *:TargetAnimationName 跳过切换到该动作时的全部 disruption payload。",
|
|||
|
|
"典型用法:FutureWand 的 HoldAttackStart -> HoldAttackLoop 是正常蓄力链路,不应清理蓄力 VFX;但 HoldAttackStart -> Dash/Dodge 仍应清理。");
|
|||
|
|
|
|||
|
|
EditorGUILayout.EndScrollView();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
private static void DrawSection(string title, params string[] lines)
|
|||
|
|
{
|
|||
|
|
EditorGUILayout.LabelField(title, EditorStyles.boldLabel);
|
|||
|
|
|
|||
|
|
StringBuilder description = new StringBuilder();
|
|||
|
|
for (int i = 0; i < lines.Length; i++)
|
|||
|
|
{
|
|||
|
|
if (i > 0)
|
|||
|
|
{
|
|||
|
|
description.AppendLine();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
description.Append(lines[i]);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
EditorGUILayout.HelpBox(description.ToString(), MessageType.None);
|
|||
|
|
EditorGUILayout.Space(10f);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|