Inventory Engine v4.2
Loading...
Searching...
No Matches
MoreMountains.Tools.MMInput Class Reference

Input helpers. More...

Inherits MonoBehaviour.

Classes

class  IMButton
 IM button, short for InputManager button, a class used to handle button states, whether mobile or actual keys. More...

Public Types

enum  ButtonStates { Off , ButtonDown , ButtonPressed , ButtonUp }
 All possible states for a button. More...
enum  AxisTypes { Positive , Negative }

Static Public Member Functions

static ButtonStates ProcessAxisAsButton (string axisName, float threshold, ButtonStates currentState, AxisTypes AxisType=AxisTypes.Positive)
 Takes an axis and returns a ButtonState depending on whether the axis is pressed or not (useful for xbox triggers for example), and when you need to use an axis/trigger as a binary thing.

Detailed Description

Input helpers.

Member Enumeration Documentation

◆ AxisTypes

Enumerator
Positive 
Negative 

◆ ButtonStates

All possible states for a button.

Can be used in a state machine.

Enumerator
Off 
ButtonDown 
ButtonPressed 
ButtonUp 

Member Function Documentation

◆ ProcessAxisAsButton()

ButtonStates MoreMountains.Tools.MMInput.ProcessAxisAsButton ( string axisName,
float threshold,
ButtonStates currentState,
AxisTypes AxisType = AxisTypes::Positive )
static

Takes an axis and returns a ButtonState depending on whether the axis is pressed or not (useful for xbox triggers for example), and when you need to use an axis/trigger as a binary thing.

Returns
The axis as button.
Parameters
axisNameAxis name.
thresholdThreshold value below which the button is off or released.
currentStateCurrent state of the axis.

The documentation for this class was generated from the following file: