Souljack/Assets/_Project/Scripts/PlayerStats.cs

56 lines
1.9 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;
public class PlayerStats : MonoBehaviour
{
[Header("Камера и Мышь")]
public float mouseSensitivity = 0.1f;
public float maxLookAngle = 80f;
[Header("Скорости передвижения (м/с)")]
public float moveSpeed = 6.5f;
public float sprintSpeed = 9.5f;
public float crouchSpeed = 3f;
[Header("Параметры Подката (Slide)")]
public float slideInitialSpeed = 15f;
public float slideDuration = 0.85f;
public float slideFriction = 2.8f;
public float slideCameraTiltAngle = 4f;
public float slideCooldown = 0.35f;
[Header("Физика CS / Source (Bunnyhop & Strafe)")]
public float groundFriction = 5f;
public float groundAcceleration = 10f;
public float airAcceleration = 80f;
public float airCap = 2.0f;
public bool showSpeedometer = true;
[Header("Гравитация и Прыжок")]
public float jumpHeight = 1.35f;
public float gravity = -25f;
public float fallMultiplier = 1.8f;
public LayerMask groundLayer;
public float groundCheckDistance = 0.12f;
public float jumpBufferTime = 0.12f;
[Header("Параметры приседания")]
public float standingHeight = 2f;
public float crouchingHeight = 1.05f;
public float standingCameraY = 1.6f;
public float crouchingCameraY = 0.8f;
public float crouchTransitionSpeed = 15f;
[Header("Тряска Камеры (Headbob)")]
public bool enableHeadBob = true;
public float walkBobSpeed = 12f;
public float walkBobAmount = 0.04f;
public float sprintBobSpeed = 15f;
public float sprintBobAmount = 0.07f;
public float impactRecoverySpeed = 6f;
private void Awake()
{
// Загружаем чувствительность мыши при старте
mouseSensitivity = PlayerPrefs.GetFloat("MouseSensitivity", mouseSensitivity);
}
}