KS.Reactor.ksInput Class Reference

Class for querying player inputs. More...

Public Member Functions

bool IsDown (uint button)
 Checks if a button is down. More...
 
bool IsPressed (uint button)
 Checks if a button was pressed. More...
 
bool IsReleased (uint button)
 Checks if a button was released. More...
 
float GetAxis (uint axis)
 Gets the value of an axis. More...
 
ksMultiType GetValue (uint id)
 Gets a value. More...
 
bool IsValueChanged (uint id)
 Checks if a value changed on this input frame. More...
 
void Use ()
 Marks the input as used. More...
 
void CleanUp ()
 Clears the state and returns the object to the pool. More...
 

Properties

bool IsUsed [get]
 Has this input been used? More...
 

Detailed Description

Class for querying player inputs.

Member Function Documentation

◆ CleanUp()

void KS.Reactor.ksInput.CleanUp ( )

Clears the state and returns the object to the pool.

It is recommended you call this when you are done with an input.

◆ GetAxis()

float KS.Reactor.ksInput.GetAxis ( uint  axis)

Gets the value of an axis.

Parameters
axisAxis to get value for.
Returns
Value of the axis.

◆ GetValue()

ksMultiType KS.Reactor.ksInput.GetValue ( uint  id)

Gets a value.

Parameters
idId of value to get.
Returns
Value

◆ IsDown()

bool KS.Reactor.ksInput.IsDown ( uint  button)

Checks if a button is down.

Parameters
buttonButton to check.
Returns
True if the button is down.

◆ IsPressed()

bool KS.Reactor.ksInput.IsPressed ( uint  button)

Checks if a button was pressed.

This will be true for one frame when a button is pressed.

Parameters
buttonButton to check.
Returns
True if the button was pressed.

◆ IsReleased()

bool KS.Reactor.ksInput.IsReleased ( uint  button)

Checks if a button was released.

This will be true for one frame when a button is released.

Parameters
buttonButton to check.
Returns
True if the button was released.

◆ IsValueChanged()

bool KS.Reactor.ksInput.IsValueChanged ( uint  id)

Checks if a value changed on this input frame.

Parameters
idId of value to check.
Returns
True if the value changed.

◆ Use()

void KS.Reactor.ksInput.Use ( )

Marks the input as used.

Property Documentation

◆ IsUsed

bool KS.Reactor.ksInput.IsUsed
get

Has this input been used?