2021-01-27 12:27:56 +01:00
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
2021-02-15 19:09:32 +01:00
|
|
|
using UnityEngine.Serialization;
|
2021-01-27 12:27:56 +01:00
|
|
|
|
|
|
|
[CreateAssetMenu(fileName = "PlayerMovementSettings.asset", menuName = "KernelPanic/Player/MovementSettings")]
|
|
|
|
public class PlayerMovementSettings : ScriptableObject
|
|
|
|
{
|
2021-02-15 19:09:32 +01:00
|
|
|
public float UpGravity => _upGravity;
|
|
|
|
public float DownGravity => _downGravity;
|
|
|
|
public float GroundedYVelocity => _groundedYVelocity;
|
|
|
|
public float BaseMovementForce => _baseMovementForce;
|
|
|
|
public float JumpHeight => _jumpHeight;
|
|
|
|
public float CoyoteTime => _coyoteTime;
|
|
|
|
public float BoostForce => _boostForce;
|
|
|
|
public float BoostTime => _boostTime;
|
|
|
|
public float BlinkDistance => _blinkDistance;
|
|
|
|
public float BlinkVelocity => _blinkVelocity;
|
|
|
|
public float MinBoostVelocity => _minBoostVelocity;
|
|
|
|
public float DragCoefficient => _dragCoefficient;
|
|
|
|
public float BoostDragCoefficient => _boostDragCoefficient;
|
|
|
|
public float AirDragCoefficient => _airDragCoefficient;
|
|
|
|
public float StillDragCoefficient => _stillDragCoefficient;
|
|
|
|
public float LookSpeed => _lookSpeed;
|
|
|
|
|
|
|
|
[Header( "Look" )]
|
|
|
|
[SerializeField]
|
|
|
|
private float _lookSpeed;
|
|
|
|
|
|
|
|
[Header("Gravity")]
|
|
|
|
[SerializeField]
|
|
|
|
private float _upGravity;
|
|
|
|
[SerializeField]
|
|
|
|
private float _downGravity;
|
|
|
|
[SerializeField]
|
|
|
|
private float _groundedYVelocity;
|
|
|
|
|
|
|
|
[Header("Movement")]
|
|
|
|
[SerializeField]
|
|
|
|
private float _baseMovementForce;
|
|
|
|
|
|
|
|
[Header("Jump")]
|
|
|
|
[SerializeField]
|
|
|
|
private float _jumpHeight;
|
|
|
|
[SerializeField]
|
|
|
|
private float _coyoteTime;
|
|
|
|
|
|
|
|
[Header("Boost")]
|
|
|
|
[SerializeField]
|
|
|
|
private float _boostForce;
|
|
|
|
[SerializeField]
|
|
|
|
private float _boostTime;
|
|
|
|
[SerializeField]
|
|
|
|
private float _minBoostVelocity;
|
|
|
|
|
|
|
|
[Header( "Blink" )]
|
|
|
|
[SerializeField]
|
|
|
|
private float _blinkDistance;
|
|
|
|
[SerializeField]
|
|
|
|
private float _blinkVelocity;
|
|
|
|
|
|
|
|
[Header("Drag")]
|
|
|
|
[SerializeField]
|
|
|
|
private float _dragCoefficient;
|
|
|
|
[SerializeField]
|
|
|
|
private float _boostDragCoefficient;
|
|
|
|
[SerializeField]
|
|
|
|
private float _airDragCoefficient;
|
|
|
|
[SerializeField]
|
|
|
|
private float _stillDragCoefficient;
|
2021-01-27 12:27:56 +01:00
|
|
|
}
|