uPano  v3.1
InfinityCode.uPano.InputManager Class Reference

Wrapper for fields and methods of Input used by uPano. Can be used to intercept input and adapt an asset to a new input system. More...

Static Public Member Functions

static float GetAxis (string axisName)
 Returns the value of the virtual axis identified by axisName. More...
 
static bool GetKey (KeyCode key)
 Returns true while the user holds down the key identified by the key KeyCode enum parameter. More...
 
static bool GetMouseButton (int button)
 Returns whether the given mouse button is held down. More...
 
static bool GetMouseButtonDown (int button)
 Returns true during the frame the user pressed the given mouse button. More...
 
static bool GetMouseButtonUp (int button)
 Returns true during the frame the user releases the given mouse button. More...
 
static Touch GetTouch (int index)
 Get Touch struct by index. More...
 

Static Public Attributes

static Func< Compass > OnCompass
 Intercept getting compass More...
 
static Func< string, float > OnGetAxis
 Intercept getting axis More...
 
static Func< KeyCode, bool > OnGetKey
 Intercept getting key More...
 
static Func< int, bool > OnGetMouseButton
 Intercept getting mouse button More...
 
static Func< int, bool > OnGetMouseButtonDown
 Intercept getting mouse button down More...
 
static Func< int, bool > OnGetMouseButtonUp
 Intercept getting mouse button up More...
 
static Func< int, Touch > OnGetTouch
 Intercept getting touche More...
 
static Func< Gyroscope > OnGyro
 Intercept getting gyro More...
 
static Func< LocationService > OnLocation
 Intercept getting location More...
 
static Func< Vector2 > OnMousePosition
 Intercept getting mouse position More...
 
static Func< int > OnTouchCount
 Intercept getting touch count More...
 
static Func< bool > OnTouchSupported
 Intercept getting touch supported More...
 
static Func< Touch[]> OnTouches
 Intercept getting touches More...
 

Properties

static Compass compass [get]
 Property for accessing compass (handheld devices only). More...
 
static Gyroscope gyro [get]
 Returns default gyroscope. More...
 
static LocationService location [get]
 Property for accessing device location (handheld devices only). More...
 
static Vector2 mousePosition [get]
 The current mouse position in pixel coordinates. More...
 
static int touchCount [get]
 Number of touches. Guaranteed not to change throughout the frame. More...
 
static bool touchSupported [get]
 Returns whether the device on which application is currently running supports touch input. More...
 
static Touch[] touches [get]
 Returns list of objects representing status of all touches during last frame. More...
 

Detailed Description

Wrapper for fields and methods of Input used by uPano. Can be used to intercept input and adapt an asset to a new input system.

Member Function Documentation

◆ GetAxis()

static float InfinityCode.uPano.InputManager.GetAxis ( string  axisName)
static

Returns the value of the virtual axis identified by axisName.

Parameters
axisNameAxis name
Returns
Value

◆ GetKey()

static bool InfinityCode.uPano.InputManager.GetKey ( KeyCode  key)
static

Returns true while the user holds down the key identified by the key KeyCode enum parameter.

Parameters
keyKeyCode
Returns
Button state

◆ GetMouseButton()

static bool InfinityCode.uPano.InputManager.GetMouseButton ( int  button)
static

Returns whether the given mouse button is held down.

Parameters
buttonMouse button
Returns
Mouse button state

◆ GetMouseButtonDown()

static bool InfinityCode.uPano.InputManager.GetMouseButtonDown ( int  button)
static

Returns true during the frame the user pressed the given mouse button.

Parameters
buttonMouse button
Returns
Mouse button state

◆ GetMouseButtonUp()

static bool InfinityCode.uPano.InputManager.GetMouseButtonUp ( int  button)
static

Returns true during the frame the user releases the given mouse button.

Parameters
buttonMouse button
Returns
Mouse button state

◆ GetTouch()

static Touch InfinityCode.uPano.InputManager.GetTouch ( int  index)
static

Get Touch struct by index.

Parameters
indexTouch index
Returns
Touch struct

Member Data Documentation

◆ OnCompass

Func<Compass> InfinityCode.uPano.InputManager.OnCompass
static

Intercept getting compass

◆ OnGetAxis

Func<string, float> InfinityCode.uPano.InputManager.OnGetAxis
static

Intercept getting axis

◆ OnGetKey

Func<KeyCode, bool> InfinityCode.uPano.InputManager.OnGetKey
static

Intercept getting key

◆ OnGetMouseButton

Func<int, bool> InfinityCode.uPano.InputManager.OnGetMouseButton
static

Intercept getting mouse button

◆ OnGetMouseButtonDown

Func<int, bool> InfinityCode.uPano.InputManager.OnGetMouseButtonDown
static

Intercept getting mouse button down

◆ OnGetMouseButtonUp

Func<int, bool> InfinityCode.uPano.InputManager.OnGetMouseButtonUp
static

Intercept getting mouse button up

◆ OnGetTouch

Func<int, Touch> InfinityCode.uPano.InputManager.OnGetTouch
static

Intercept getting touche

◆ OnGyro

Func<Gyroscope> InfinityCode.uPano.InputManager.OnGyro
static

Intercept getting gyro

◆ OnLocation

Func<LocationService> InfinityCode.uPano.InputManager.OnLocation
static

Intercept getting location

◆ OnMousePosition

Func<Vector2> InfinityCode.uPano.InputManager.OnMousePosition
static

Intercept getting mouse position

◆ OnTouchCount

Func<int> InfinityCode.uPano.InputManager.OnTouchCount
static

Intercept getting touch count

◆ OnTouches

Func<Touch[]> InfinityCode.uPano.InputManager.OnTouches
static

Intercept getting touches

◆ OnTouchSupported

Func<bool> InfinityCode.uPano.InputManager.OnTouchSupported
static

Intercept getting touch supported

Property Documentation

◆ compass

Compass InfinityCode.uPano.InputManager.compass
staticget

Property for accessing compass (handheld devices only).

◆ gyro

Gyroscope InfinityCode.uPano.InputManager.gyro
staticget

Returns default gyroscope.

◆ location

LocationService InfinityCode.uPano.InputManager.location
staticget

Property for accessing device location (handheld devices only).

◆ mousePosition

Vector2 InfinityCode.uPano.InputManager.mousePosition
staticget

The current mouse position in pixel coordinates.

◆ touchCount

int InfinityCode.uPano.InputManager.touchCount
staticget

Number of touches. Guaranteed not to change throughout the frame.

◆ touches

Touch [] InfinityCode.uPano.InputManager.touches
staticget

Returns list of objects representing status of all touches during last frame.

◆ touchSupported

bool InfinityCode.uPano.InputManager.touchSupported
staticget

Returns whether the device on which application is currently running supports touch input.