static bool Down( string action, bool complainOnMissing )

robot_2Generated
code_blocksInput

Description

The Down method in the Sandbox.Input class is used to check if a specific input action is currently being held down. This method is static and can be called without instantiating the Input class.

Usage

To use the Down method, provide the name of the action you want to check as a string. Optionally, you can specify whether to log a warning if the action is not found by setting the complainOnMissing parameter to true.

The method returns a boolean value: true if the action is currently being held down, and false otherwise.

Example

// Example usage of the Input.Down method
bool isJumping = Input.Down("jump", true);
if (isJumping)
{
    // Execute logic for when the jump action is held down
}