Infinite Runner Engine v1.9
Classes | Public Types | Static Public Member Functions | List of all members
MoreMountains.Tools.MMInput Class Reference

Input helpers More...

Inheritance diagram for MoreMountains.Tools.MMInput:

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. Can be used in a state machine. 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 More...
 

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()

static 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: