2025-11-25 08:19:33 -05:00
|
|
|
|
using System;
|
2026-01-03 18:19:39 -05:00
|
|
|
|
using System.Collections.Generic;
|
2026-01-17 11:35:49 -05:00
|
|
|
|
using Sirenix.Serialization;
|
2025-11-25 08:19:33 -05:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
|
|
namespace SLSUtilities.FunctionalAnimation
|
|
|
|
|
|
{
|
|
|
|
|
|
public enum DisruptionType
|
|
|
|
|
|
{
|
|
|
|
|
|
Must = 10000,
|
|
|
|
|
|
Death = 9999,
|
|
|
|
|
|
|
|
|
|
|
|
ForcedExternal = 1001,
|
|
|
|
|
|
ForcedAction = 1000,
|
|
|
|
|
|
|
|
|
|
|
|
NormalExternal = 501,
|
|
|
|
|
|
NormalAction = 500,
|
|
|
|
|
|
|
|
|
|
|
|
Movement = 100,
|
|
|
|
|
|
None = 0
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
|
public struct FuncAnimInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
[Tooltip("代码中调用的动画名称")]
|
|
|
|
|
|
public string animationName;
|
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("对应Animator中的State名称")]
|
|
|
|
|
|
public string stateName;
|
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("这个技能是否使用Root Motion?")]
|
|
|
|
|
|
public bool useRootMotion;
|
|
|
|
|
|
|
2026-01-03 18:19:39 -05:00
|
|
|
|
[Tooltip("技能的Tag")]
|
|
|
|
|
|
public List<string> tags;
|
|
|
|
|
|
|
2025-11-25 08:19:33 -05:00
|
|
|
|
[Tooltip("技能的默认打断类型")]
|
|
|
|
|
|
public DisruptionType disruptionType;
|
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("技能的播放速度,会临时参与对Animator.speed的改变")]
|
|
|
|
|
|
public float overridePlaySpeed; //通常用来处理外部购买的动作素材,默认为1。
|
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("从指定帧开始播放")]
|
|
|
|
|
|
public int overrideStartFrame; //通常用来处理外部购买的动作素材,默认为0。
|
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("技能是否受速度倍率影响 (例如:角色的攻速属性)")]
|
|
|
|
|
|
public bool isAffectedBySpeedMultiplier;
|
|
|
|
|
|
|
|
|
|
|
|
[Tooltip("技能描述,通常是给开发者看的,便于回忆,可以不写,不会在游戏中显示")]
|
|
|
|
|
|
public string description;
|
|
|
|
|
|
|
2026-01-03 18:19:39 -05:00
|
|
|
|
public FuncAnimInfo(string animationName, string stateName, bool useRootMotion, List<string> tags, DisruptionType disruptionType,
|
2026-01-17 11:35:49 -05:00
|
|
|
|
float overridePlaySpeed, int overrideStartFrame, bool isAffectedBySpeedMultiplier)
|
2025-11-25 08:19:33 -05:00
|
|
|
|
{
|
|
|
|
|
|
this.animationName = animationName;
|
|
|
|
|
|
this.stateName = stateName;
|
|
|
|
|
|
this.useRootMotion = useRootMotion;
|
2026-01-03 18:19:39 -05:00
|
|
|
|
this.tags = tags;
|
2025-11-25 08:19:33 -05:00
|
|
|
|
this.disruptionType = disruptionType;
|
|
|
|
|
|
this.overridePlaySpeed = overridePlaySpeed;
|
|
|
|
|
|
this.overrideStartFrame = overrideStartFrame;
|
|
|
|
|
|
this.isAffectedBySpeedMultiplier = isAffectedBySpeedMultiplier;
|
|
|
|
|
|
this.description = "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|