Class JumpAction
Jump action that can be performed by a character controller.
Inherited Members
Namespace: nickmaltbie.OpenKCC.Character.Action
Assembly: cs.temp.dll.dll
Syntax
public class JumpAction : ConditionalAction
Fields
jumpAngleWeightFactor
Weight to which the player's jump is weighted towards the direction of the surface they are standing on.
Declaration
public float jumpAngleWeightFactor
Field Value
Type | Description |
---|---|
Single |
jumpInput
Jump action that can be performed by a character controller.
Declaration
public BufferedInput jumpInput
Field Value
Type | Description |
---|---|
BufferedInput |
jumpVelocity
Velocity of player jump in units per second.
Declaration
public float jumpVelocity
Field Value
Type | Description |
---|---|
Single |
maxJumpAngle
Maximum angle at which the player can jump (in degrees).
Declaration
public float maxJumpAngle
Field Value
Type | Description |
---|---|
Single |
Properties
AttemptingJump
Is the player currently attempting to jump
Declaration
public bool AttemptingJump { get; }
Property Value
Type | Description |
---|---|
Boolean |
JumpedWhileSliding
Has the player jumped while they are sliding.
Declaration
public bool JumpedWhileSliding { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
ApplyJumpIfPossible(IKCCGrounded)
Apply the jump action to the actor if attempting jump and the player can jump.
Declaration
public bool ApplyJumpIfPossible(IKCCGrounded grounded)
Parameters
Type | Name | Description |
---|---|---|
IKCCGrounded | grounded |
Returns
Type | Description |
---|---|
Boolean | True if the player jumped, false otherwise. |
CanJump()
Can the player jump based on their current state.
Declaration
public bool CanJump()
Returns
Type | Description |
---|---|
Boolean | True if the player can jump, false otherwise. |
Jump()
Apply the jump to the player.
Declaration
public void Jump()
Setup(IKCCGrounded, IKCCConfig, IJumping)
Setup this jump action.
Declaration
public void Setup(IKCCGrounded kccGrounded, IKCCConfig kccConfig, IJumping actor)
Parameters
Type | Name | Description |
---|---|---|
IKCCGrounded | kccGrounded | |
IKCCConfig | kccConfig | |
IJumping | actor |
Update()
Add delta time to update the conditional action state.
Declaration
public override void Update()