Last updated
Last updated
This part of the code introduces the JumpVariables
class, which includes a nested JumpInfo
class. The JumpInfo
class allows you to create multiple jumps using a list, and you can choose the animation that will play for each jump using the Animation
variable within the nested class. The jump mechanism uses the derivative of the JumpHeightCurve
to create a velocity curve that unfolds over a specified time. Additionally, players can move left and right while jumping and landing by adjusting variables such as xSpeedUpCurve
, xSlowDownCurve
, and xTurnBackCurve
. The Jump and Land states are mostly consecutive: the Jump state starts with the player beginning to ascend and reaching the maximum height, and then the player enters the Land state until they touch the ground.