Files
zeling_v2/Assets/_Game/Scripts/Player/PlayerMovementConfigSO.cs

63 lines
3.0 KiB
C#
Raw 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 UnityEngine;
namespace BaseGames.Player
{
[CreateAssetMenu(menuName = "BaseGames/Player/MovementConfig")]
public class PlayerMovementConfigSO : ScriptableObject
{
[Header("地面移动")]
public float RunSpeed = 7f;
public float Acceleration = 50f;
public float Deceleration = 80f;
[Header("跳跃(对齐空洞骑士手感)")]
[Tooltip("一段跳初速度。HK 约 18-20对应 ~4-5 格高度。")]
public float JumpForce = 19f;
[Tooltip("按住跳跃键可保持的郊狼时间。HK ~0.12s。")]
public float CoyoteTime = 0.12f;
[Tooltip("下落阶段额外重力倍率。HK ~3.5,使下落比上升更快、手感更紧实。")]
public float FallGravityMult = 3.5f;
[Tooltip("最大下落速度终端速度。HK ~22。")]
public float MaxFallSpeed = 22f;
[Tooltip("松开跳跃键时速度保留比例变高跳。HK ~0.45,越小跳跃越低。")]
[Range(0f, 1f)]
public float JumpCutMultiplier = 0.45f;
[Header("二段跳Monarch Wings 等效)")]
[Tooltip("二段跳初速度。设为与 JumpForce 相同可获得等高二段跳HK 风格)。")]
public float DoubleJumpForce = 19f;
[Header("冲刺(对齐空洞骑士 Mothwing Cloak 手感)")]
[Tooltip("冲刺速度(单位/秒。HK ~25在 0.35s 内约穿越 7-8 格。")]
public float DashSpeed = 25f;
[Tooltip("冲刺持续时长。HK ~0.35s。")]
public float DashDuration = 0.35f;
[Tooltip("冲刺冷却时长。HK ~0.6s,落地后才可再次冲刺。")]
public float DashCooldown = 0.6f;
[Tooltip("每次腾空可使用的最大空中冲刺次数。HK = 1Mothwing Cloak。")]
public int MaxAerialDashes = 1;
[Header("冲刺无敌帧(对齐空洞骑士:窗口 < 冲刺时长,且有独立 CD")]
[Tooltip("冲刺无敌窗口时长。仅为冲刺前段窗口结束后即使仍在冲刺中也可受伤被打断HK ~0.20s)。")]
public float DashInvincibilityDuration = 0.20f;
[Tooltip("无敌的独立冷却。CD 内再次冲刺不会获得无敌帧防止连冲变相持续无敌HK ~0.9s)。")]
public float DashInvincibilityCooldown = 0.9f;
[Header("蹬墙 / 壁滑")]
public float WallSlideSpeed = 2f;
public float WallJumpForceX = 12f;
public float WallJumpForceY = 16f;
public float WallRayLength = 0.55f;
public float WallRayOffsetY = 0.2f;
public float WallGrabMaxHeightGain = 0.5f;
public float WallGrabReleaseDelay = 0.08f;
public float WallJumpBackForceX = 14f;
public float WallJumpAwayForceX = 10f;
public float WallJumpAwayForceY = 18f;
public float WallJumpInputLockDuration = 0.15f;
[Header("重力")]
public float DefaultGravityScale = 3f;
}
}