摄像机区域的优化

This commit is contained in:
2026-05-17 07:56:12 +08:00
parent f264329751
commit d25f237e76
62 changed files with 25774 additions and 5450 deletions

View File

@@ -3,9 +3,9 @@ using UnityEngine;
namespace BaseGames.Player.States
{
/// <summary>
/// 跳跃状态(对齐空洞骑士手感)
/// 跳跃状态。
/// - 一段跳 / 郊狼跳OnStateEnter 时调用 Move.Jump()。
/// - 二段跳(Monarch Wings 等效):上升或下落途中再按跳跃且 AirJumpsLeft > 0
/// - 二段跳(二段跳能力解锁后可用):上升或下落途中再按跳跃且 AirJumpsLeft > 0
/// 调用 Move.DoubleJump(),重播跳跃动画,不离开本状态(保持速度截断逻辑)。
/// - 空中冲刺:上升途中按冲刺且 HasAbility(AirDash) → AerialDashState。
/// - 变高跳:松开跳跃键触发 JumpCancelledEvent → CutJump()(系数 = JumpCutMultiplier
@@ -59,7 +59,7 @@ namespace BaseGames.Player.States
}
}
// 二段跳:上升阶段即可触发(类比 HK Monarch Wings随时可二段跳)
// 二段跳:上升阶段即可触发(上升途中任意时刻可二段跳)
if (Buffer.ConsumeJump() && Owner.AirJumpsLeft > 0)
{
Owner.UseAirJump();
@@ -68,10 +68,15 @@ namespace BaseGames.Player.States
if (AnimCfg?.Jump != null) Anim?.Play(AnimCfg.Jump);
return;
}
}
// 水平移动HK 空中控制:与跑步同速)
public override void OnStateFixedUpdate()
{
// 空中水平移动:有输入时立即覆盖至目标速度;无输入时施加空气阻力保留动量
if (Mathf.Abs(Input.MoveInput.x) > 0.01f)
Move.Move(Input.MoveInput.x * Cfg.RunSpeed);
else
Move.ApplyAirDrag(Cfg.AirDragFactor);
}
public override void OnStateExit()