[CreateAssetMenu(menuName = "Player Data")]//Create a new playerData object by right clicking in the Project Menu then Create/Player/Player Data and drag onto the player
publicfloatfallGravityMult;//Multiplier to the player's gravityScale when falling.
publicfloatmaxFallSpeed;//Maximum fall speed (terminal velocity) of the player when falling.
[Space(5)]
publicfloatfastFallGravityMult;//Larger multiplier to the player's gravityScale when they are falling and a downwards input is pressed.
//Seen in games such as Celeste, lets the player fall extra fast if they wish.
publicfloatmaxFastFallSpeed;//Maximum fall speed(terminal velocity) of the player when performing a faster fall.
[Space(20)]
[Header("Run")]
publicfloatrunMaxSpeed;//Target speed we want the player to reach.
publicfloatrunAcceleration;//The speed at which our player accelerates to max speed, can be set to runMaxSpeed for instant acceleration down to 0 for none at all
publicfloatrunDecceleration;//The speed at which our player decelerates from their current speed, can be set to runMaxSpeed for instant deceleration down to 0 for none at all
publicfloatjumpHeight;//Height of the player's jump
publicfloatjumpTimeToApex;//Time between applying the jump force and reaching the desired jump height. These values also control the player's gravity and jump force.
publicfloatjumpHangTimeThreshold;//Speeds (close to 0) where the player will experience extra "jump hang". The player's velocity.y is closest to 0 at the jump's apex (think of the gradient of a parabola or quadratic function)
[Space(0.5f)]
publicfloatjumpHangAccelerationMult;
publicfloatjumpHangMaxSpeedMult;
[Header("Wall Jump")]
publicVector2wallJumpForce;//The actual force (this time set by us) applied to the player when wall jumping.
[Range(0.01f, 0.5f)]publicfloatcoyoteTime;//Grace period after falling off a platform, where you can still jump
[Range(0.01f, 0.5f)]publicfloatjumpInputBufferTime;//Grace period after pressing jump where a jump will be automatically performed once the requirements (eg. being grounded) are met.