Infinite Runner Engine v1.9
Public Member Functions | Public Attributes | Protected Attributes | Properties | List of all members
MoreMountains.Tools.MMInput.IMButton Class Reference

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

Public Member Functions

delegate void ButtonDownMethodDelegate ()
 
delegate void ButtonPressedMethodDelegate ()
 
delegate void ButtonUpMethodDelegate ()
 
bool ButtonDownRecently (float time)
 returns true if this button was pressed down within the time (in unscaled seconds) passed in parameters More...
 
bool ButtonUpRecently (float time)
 returns true if this button was released within the time (in unscaled seconds) passed in parameters More...
 
 IMButton (string playerID, string buttonID, ButtonDownMethodDelegate btnDown=null, ButtonPressedMethodDelegate btnPressed=null, ButtonUpMethodDelegate btnUp=null)
 
virtual void TriggerButtonDown ()
 
virtual void TriggerButtonPressed ()
 
virtual void TriggerButtonUp ()
 

Public Attributes

string ButtonID
 the unique ID of this button More...
 
ButtonDownMethodDelegate ButtonDownMethod
 
ButtonPressedMethodDelegate ButtonPressedMethod
 
ButtonUpMethodDelegate ButtonUpMethod
 

Protected Attributes

float _lastButtonDownAt
 
float _lastButtonUpAt
 

Properties

MMStateMachine< MMInput.ButtonStatesState [getprotected set]
 a state machine used to store button states More...
 
float TimeSinceLastButtonDown [get]
 returns the time (in unscaled seconds) since the last time the button was pressed down More...
 
float TimeSinceLastButtonUp [get]
 returns the time (in unscaled seconds) since the last time the button was released More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ IMButton()

MoreMountains.Tools.MMInput.IMButton.IMButton ( string  playerID,
string  buttonID,
ButtonDownMethodDelegate  btnDown = null,
ButtonPressedMethodDelegate  btnPressed = null,
ButtonUpMethodDelegate  btnUp = null 
)

Member Function Documentation

◆ ButtonDownMethodDelegate()

delegate void MoreMountains.Tools.MMInput.IMButton.ButtonDownMethodDelegate ( )

◆ ButtonDownRecently()

bool MoreMountains.Tools.MMInput.IMButton.ButtonDownRecently ( float  time)

returns true if this button was pressed down within the time (in unscaled seconds) passed in parameters

◆ ButtonPressedMethodDelegate()

delegate void MoreMountains.Tools.MMInput.IMButton.ButtonPressedMethodDelegate ( )

◆ ButtonUpMethodDelegate()

delegate void MoreMountains.Tools.MMInput.IMButton.ButtonUpMethodDelegate ( )

◆ ButtonUpRecently()

bool MoreMountains.Tools.MMInput.IMButton.ButtonUpRecently ( float  time)

returns true if this button was released within the time (in unscaled seconds) passed in parameters

◆ TriggerButtonDown()

virtual void MoreMountains.Tools.MMInput.IMButton.TriggerButtonDown ( )
virtual

◆ TriggerButtonPressed()

virtual void MoreMountains.Tools.MMInput.IMButton.TriggerButtonPressed ( )
virtual

◆ TriggerButtonUp()

virtual void MoreMountains.Tools.MMInput.IMButton.TriggerButtonUp ( )
virtual

Member Data Documentation

◆ _lastButtonDownAt

float MoreMountains.Tools.MMInput.IMButton._lastButtonDownAt
protected

◆ _lastButtonUpAt

float MoreMountains.Tools.MMInput.IMButton._lastButtonUpAt
protected

◆ ButtonDownMethod

ButtonDownMethodDelegate MoreMountains.Tools.MMInput.IMButton.ButtonDownMethod

◆ ButtonID

string MoreMountains.Tools.MMInput.IMButton.ButtonID

the unique ID of this button

◆ ButtonPressedMethod

ButtonPressedMethodDelegate MoreMountains.Tools.MMInput.IMButton.ButtonPressedMethod

◆ ButtonUpMethod

ButtonUpMethodDelegate MoreMountains.Tools.MMInput.IMButton.ButtonUpMethod

Property Documentation

◆ State

MMStateMachine<MMInput.ButtonStates> MoreMountains.Tools.MMInput.IMButton.State
getprotected set

a state machine used to store button states

◆ TimeSinceLastButtonDown

float MoreMountains.Tools.MMInput.IMButton.TimeSinceLastButtonDown
get

returns the time (in unscaled seconds) since the last time the button was pressed down

◆ TimeSinceLastButtonUp

float MoreMountains.Tools.MMInput.IMButton.TimeSinceLastButtonUp
get

returns the time (in unscaled seconds) since the last time the button was released


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