多轮审查和修复
This commit is contained in:
@@ -19,6 +19,26 @@ namespace BaseGames.Enemies
|
||||
|
||||
[Header("受击")]
|
||||
public AnimationClip Hurt;
|
||||
public AnimationClip Stagger;
|
||||
public AnimationClip Dead;
|
||||
|
||||
/// <summary>
|
||||
/// 按字段名返回 Clip(BD_PlayAnimation 使用)。
|
||||
/// 支持字段名和常见别名(如 Attack_Melee / Idle 等)。
|
||||
/// </summary>
|
||||
public AnimationClip GetClipByName(string name)
|
||||
{
|
||||
return name switch
|
||||
{
|
||||
"Idle" => Idle,
|
||||
"Walk" => Walk,
|
||||
"Run" => Run,
|
||||
"Attack" or "Attack_Melee" => Attack,
|
||||
"Hurt" => Hurt,
|
||||
"Stagger" => Stagger,
|
||||
"Dead" or "Death" => Dead,
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user