Skip to content

Instantly share code, notes, and snippets.

View qfys521's full-sized avatar
💭
摸鱼中🐟

千枫·遇裳 qfys521

💭
摸鱼中🐟
View GitHub Profile
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; // 重力加速度