Click or drag to resize
SpriteBaseIsInputPressed Method
Determine if the specified input is being pressed for this sprite.

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
public virtual bool IsInputPressed(
	SpriteBaseInputBits Input,
	bool InitialOnly
)

Parameters

Input
Type: (Default Namespace)SpriteBaseInputBits
Which of thes sprite's inputs should be checked
InitialOnly
Type: SystemBoolean
If this is true, the result will only be true if the input has just been pressed and was not pressed before.

Return Value

Type: Boolean
If InitialOnly is set, true only when the specified input on this sprite has just been turned on or pressed, otherwise true if the input is currently on or "pressed" regardless of the previous state of the input.
Remarks
This function uses oldinputs to determine whether an input was pressed before or not (when InitialOnly is true). oldinputs is automatically managed by the MapPlayerToInputs(Int32) function.
See Also