This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| public class PlayerMovement : MonoBehaviour | |
| { | |
| #region 移动设置 | |
| [Header("移动设置")] | |
| public float speed = 6f; // 基础移动速度 | |
| public float sprintMultiplier = 2f; // 冲刺时速度倍增 | |
| public float jumpHeight = 1.5f; // 跳跃高度 | |
| public float gravity = -9.81f; // 重力加速度 |