Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsInput Class Reference

Class that allows you to get input using old and new input systems. More...

Static Public Member Functions

static float GetAxis (string axisName)
 Returns the value of the virtual axis identified by axisName.
 
static bool GetKey (KeyCode keyCode)
 Returns true while the user holds down the key identified by keyCode.
 
static bool GetKey (string name)
 Returns true during the frame the user starts pressing down the key identified by name.
 
static bool GetKeyDown (KeyCode keyCode)
 Returns true during the frame the user starts pressing down the key identified by keyCode.
 
static bool GetKeyUp (KeyCode keyCode)
 Returns true during the frame the user releases the key identified by keyCode.
 
static bool GetMouseButton (int button)
 Returns whether the given mouse button is held down.
 
static bool GetMouseButtonDown (int button)
 Returns whether the given mouse button was pressed this frame.
 
static bool GetMouseButtonUp (int button)
 Returns whether the given mouse button was released this frame.
 
static Touch GetTouch (int index)
 Returns the touch for a given index.
 

Static Public Attributes

static Func< KeyCode, bool > OnGetKeyByKeyCode
 Allows you to change the returned status of a key by KeyCode.
 
static Func< string, bool > OnGetKeyByName
 Allows you to change the returned status of a key by name.
 
static Func< int, bool > OnGetMouseButton
 Allows you to change the returned status of a mouse button.
 

Properties

static Vector2 mousePosition [get]
 Returns the position of the mouse cursor.
 
static int touchCount [get]
 Number of touches. Guaranteed not to change throughout the frame.
 
static bool touchSupported [get]
 Returns whether the device on which application is currently running supports touch input.
 
static Touch[] touches [get]
 Returns list of objects representing status of all touches during last frame.
 

Detailed Description

Class that allows you to get input using old and new input systems.

Member Function Documentation

◆ GetAxis()

static float OnlineMapsInput.GetAxis ( string axisName)
static

Returns the value of the virtual axis identified by axisName.

Parameters
axisNameName of the axis
Returns
Value of the axis

◆ GetKey() [1/2]

static bool OnlineMapsInput.GetKey ( KeyCode keyCode)
static

Returns true while the user holds down the key identified by keyCode.

Parameters
keyCodeKey code
Returns
True - the key is pressed, False - the key is not pressed

◆ GetKey() [2/2]

static bool OnlineMapsInput.GetKey ( string name)
static

Returns true during the frame the user starts pressing down the key identified by name.

Parameters
nameName of the key
Returns
True - the key is pressed, False - the key is not pressed

◆ GetKeyDown()

static bool OnlineMapsInput.GetKeyDown ( KeyCode keyCode)
static

Returns true during the frame the user starts pressing down the key identified by keyCode.

Parameters
keyCodeKey code
Returns
True - the key is pressed, False - the key is not pressed

◆ GetKeyUp()

static bool OnlineMapsInput.GetKeyUp ( KeyCode keyCode)
static

Returns true during the frame the user releases the key identified by keyCode.

Parameters
keyCodeKey code
Returns
True - the key is released, False - the key is not released

◆ GetMouseButton()

static bool OnlineMapsInput.GetMouseButton ( int button)
static

Returns whether the given mouse button is held down.

Parameters
buttonButton index
Returns
True - the button is pressed, False - the button is not pressed

◆ GetMouseButtonDown()

static bool OnlineMapsInput.GetMouseButtonDown ( int button)
static

Returns whether the given mouse button was pressed this frame.

Parameters
buttonButton index
Returns
True - the button is pressed, False - the button is not pressed

◆ GetMouseButtonUp()

static bool OnlineMapsInput.GetMouseButtonUp ( int button)
static

Returns whether the given mouse button was released this frame.

Parameters
buttonButton index
Returns
True - the button is released, False - the button is not released

◆ GetTouch()

static Touch OnlineMapsInput.GetTouch ( int index)
static

Returns the touch for a given index.

Parameters
indexTouch index
Returns
Touch