角色能力,存档
This commit is contained in:
@@ -9,11 +9,20 @@ namespace BaseGames.Player
|
||||
public AnimationClip Idle;
|
||||
public AnimationClip Run;
|
||||
public AnimationClip Jump;
|
||||
[Tooltip("空中跳跃(二段跳)动画。留空则复用 Jump 动画。")]
|
||||
public AnimationClip AirJump;
|
||||
public AnimationClip Fall;
|
||||
[Tooltip("普通冲刺动画(无无敌帧,过程中受伤会被打断)。")]
|
||||
public AnimationClip Dash;
|
||||
[Tooltip("无敌冲刺动画(解锁 InvincibleDash 能力后使用)。留空则复用 Dash 动画。")]
|
||||
public AnimationClip DashInvincible;
|
||||
|
||||
[Header("墙")]
|
||||
public AnimationClip WallSlide;
|
||||
[Tooltip("背墙跳动画(无输入或反向输入时触发,远离墙壁斜上方弹出)。留空则复用 Jump 动画。")]
|
||||
public AnimationClip WallJumpAway;
|
||||
[Tooltip("对墙跳动画(朝向墙壁输入时触发,沿墙壁方向斜上方弹出)。留空则复用 Jump 动画。")]
|
||||
public AnimationClip WallJumpToward;
|
||||
|
||||
[Header("受伤 / 死亡")]
|
||||
public AnimationClip Hurt;
|
||||
@@ -24,28 +33,6 @@ namespace BaseGames.Player
|
||||
[Header("弹簧")]
|
||||
public AnimationClip UseSpring;
|
||||
|
||||
[Header("地面攻击(连招序列)")]
|
||||
public AnimationClip[] GroundAttacks;
|
||||
|
||||
/// <summary>每段连击的 HitBox 开启/关闭时间点(归一化 0-1),与 GroundAttacks 索引对应。</summary>
|
||||
[System.Serializable]
|
||||
public struct AttackTimings
|
||||
{
|
||||
[Tooltip("HitBox 开启时间点(归一化 0-1)")]
|
||||
[UnityEngine.Range(0f, 1f)] public float HitBoxEnter;
|
||||
[Tooltip("HitBox 关闭时间点(归一化 0-1)")]
|
||||
[UnityEngine.Range(0f, 1f)] public float HitBoxExit;
|
||||
}
|
||||
|
||||
[Header("地面攻击 HitBox 激活窗口(归一化时间 0-1)")]
|
||||
[Tooltip("每段连击 HitBox 开启/关闭时间点,与 GroundAttacks 索引对应")]
|
||||
public AttackTimings[] GroundAttackTimings = { new AttackTimings { HitBoxEnter = 0.3f, HitBoxExit = 0.6f } };
|
||||
|
||||
[Header("空中攻击")]
|
||||
public AnimationClip AirAttack;
|
||||
public AnimationClip UpAttack;
|
||||
public AnimationClip DownAttack; // 戳击 (Pogo)
|
||||
|
||||
[Header("弹反")]
|
||||
public AnimationClip ParryStart;
|
||||
public AnimationClip ParrySuccess;
|
||||
@@ -53,12 +40,5 @@ namespace BaseGames.Player
|
||||
[Header("游泳")]
|
||||
public AnimationClip SwimIdle;
|
||||
public AnimationClip SwimMove;
|
||||
|
||||
/// <summary>按连招步骤取地面攻击动画,越界自动取最后一个。</summary>
|
||||
public AnimationClip GetAttackClip(int step)
|
||||
{
|
||||
if (GroundAttacks == null || GroundAttacks.Length == 0) return null;
|
||||
return step < GroundAttacks.Length ? GroundAttacks[step] : GroundAttacks[^1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user