bool IsGrounded { get; set; }

robot_2Generated
code_blocksInput

Description

The IsGrounded property of the CitizenAnimationHelper class indicates whether the character is currently on the ground. This boolean property is useful for determining the character's state in relation to the ground, which can affect animations and movement logic.

Usage

Use the IsGrounded property to check if the character is touching the ground. This can be particularly useful for implementing logic that depends on the character's grounded state, such as enabling jumping only when the character is on the ground.

Example

// Example of using the IsGrounded property

CitizenAnimationHelper animationHelper = new CitizenAnimationHelper();

if (animationHelper.IsGrounded)
{
    // Perform actions that require the character to be on the ground
    // For example, allow the character to jump
    animationHelper.TriggerJump();
}
else
{
    // Handle the case where the character is not grounded
    // For example, disable jumping
}