多轮审查和修复
This commit is contained in:
@@ -18,7 +18,7 @@ namespace BaseGames.Player.States
|
||||
// 郊狼时间跳跃
|
||||
if (Buffer.ConsumeJump() && Move.HasCoyoteTime)
|
||||
{
|
||||
_owner.TransitionTo(_owner.JumpState);
|
||||
_owner.TransitionTo(_owner.GetState<JumpState>());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -27,21 +27,21 @@ namespace BaseGames.Player.States
|
||||
{
|
||||
Move.ZeroVelocity();
|
||||
if (Mathf.Abs(Input.MoveInput.x) > 0.1f)
|
||||
_owner.TransitionTo(_owner.RunState);
|
||||
_owner.TransitionTo(_owner.GetState<RunState>());
|
||||
else
|
||||
_owner.TransitionTo(_owner.IdleState);
|
||||
_owner.TransitionTo(_owner.GetState<IdleState>());
|
||||
return;
|
||||
}
|
||||
|
||||
// 空中水平移动
|
||||
if (Mathf.Abs(Input.MoveInput.x) > 0.01f)
|
||||
Move.Move(Input.MoveInput.x * (Cfg != null ? Cfg.RunSpeed : 7f));
|
||||
Move.Move(Input.MoveInput.x * Cfg.RunSpeed);
|
||||
}
|
||||
|
||||
public override void OnStateFixedUpdate()
|
||||
{
|
||||
// 增强下落重力
|
||||
if (Cfg != null && Move.Rb.velocity.y < 0f)
|
||||
if (Move.Rb.velocity.y < 0f)
|
||||
{
|
||||
float extraGrav = Physics2D.gravity.y * (Cfg.FallGravityMult - 1f) * Time.fixedDeltaTime;
|
||||
Move.Rb.velocity = new Vector2(
|
||||
|
||||
Reference in New Issue
Block a user