Files
SoulliesOfficial 50ee502684 完善
2026-02-13 09:22:11 -05:00

78 lines
2.5 KiB
C#
Raw Permalink 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 Sirenix.OdinInspector;
using Sirenix.Serialization;
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;
[Tooltip("技能的Tag")]
[ValueDropdown("GetTags")]
public List<string> tags;
[Tooltip("技能的默认打断类型")]
public DisruptionType disruptionType;
[Tooltip("技能的播放速度会临时参与对Animator.speed的改变")]
public float overridePlaySpeed; //通常用来处理外部购买的动作素材默认为1。
[Tooltip("从指定帧开始播放")]
public int overrideStartFrame; //通常用来处理外部购买的动作素材默认为0。
[Tooltip("技能是否受速度倍率影响 (例如:角色的攻速属性)")]
public bool isAffectedBySpeedMultiplier;
[Tooltip("技能描述,通常是给开发者看的,便于回忆,可以不写,不会在游戏中显示")]
public string description;
public FuncAnimInfo(string animationName, string stateName, bool useRootMotion, List<string> tags, DisruptionType disruptionType,
float overridePlaySpeed, int overrideStartFrame, bool isAffectedBySpeedMultiplier)
{
this.animationName = animationName;
this.stateName = stateName;
this.useRootMotion = useRootMotion;
this.tags = tags;
this.disruptionType = disruptionType;
this.overridePlaySpeed = overridePlaySpeed;
this.overrideStartFrame = overrideStartFrame;
this.isAffectedBySpeedMultiplier = isAffectedBySpeedMultiplier;
this.description = "";
}
public static List<string> GetTags()
{
return new List<string>()
{
"Attack",
"Skill"
};
}
}
}