cohtml.InputSystem.InputManager

This class wraps around Unity3D’s Input Manager and subscribes to its input events.

Inherits from cohtml.InputSystem.InputBase, IDisposable

Public Functions

Name
InputManager()
Initializes Unity3D event data that will be used for event processing.
voidProcessEvent(Event inputEvent)
Processes the current UnityGUI event.
virtual override MouseEventProcessMouseEvent()
Processes the current Unity3D mouse event.
virtual override KeyEventProcessKeyEvent()
Processes the current keyboard event.
voidProcessTouchEvent()
Processes the current touch event.

Protected Functions

Name
virtual override EventMouseModifiersStateGetMouseModifiers()
virtual override EventModifiersStateGetKeyboardModifiers()
virtual override boolIsNumPadKey(int keyCode)
virtual override voidMapUnityCodesWithSystemCodes()

Protected Attributes

Name
const floatKeyRepeatDelay
const floatKeyRepeatRate

Additional inherited members

Public Functions inherited from cohtml.InputSystem.InputBase

Name
voidUpdateTouches(CohtmlView view, TouchEventData [] touchEventData, uint touchesCount)
Updates the GestureManager’s with the states of the touch events that happened this frame.
virtual KeyEventData.EventLocationGetKeyLocation(int keyCode)
Returns the key location of the provided key code.
virtual EventModifiersStateUpdateKeyboardModifiers(bool isCtrlDown, bool isAltDown, bool isShiftDown, bool isNumLockDown, bool isCapsLockDown, bool isMetaDown, bool isAltGrDown)
Updates the state of the keyboard key modifiers.
virtual voidDispose()
InputBaseInitialize()
Creates a InputSystem or InputManager instance based on which Unity3D input package is used.

Protected Functions inherited from cohtml.InputSystem.InputBase

Name
InputBase()
Vector2SetScrollData(Vector2 scroll)

Public Properties inherited from cohtml.InputSystem.InputBase

Name
Action< MouseEvent, InputEventWrapper >OnMouseEvent
Invoked when a mouse event occurs.
Action< KeyEvent, InputEventWrapper >OnKeyEvent
Invoked when a keyboard event occurs.
Action< KeyEvent, char >OnCharEvent
Invoked when a character event occurs.
Action< TouchEventCollection >OnTouchEvent
Invoked when a touch event occurs.
GamepadBaseGamepad
An instance of the current gamepad manager.

Protected Attributes inherited from cohtml.InputSystem.InputBase

Name
Dictionary< int, int >s_KeyCodeMapping
int []s_RightKeysMap
int []s_LeftKeysMap
TouchEventCollections_TouchDataCached
InputEventWrapperm_UnityEvent

Public Functions Documentation

function InputManager

InputManager()

Initializes Unity3D event data that will be used for event processing.

function ProcessEvent

void ProcessEvent(
    Event inputEvent
)

Processes the current UnityGUI event.

function ProcessMouseEvent

virtual override MouseEvent ProcessMouseEvent()

Processes the current Unity3D mouse event.

Reimplements: cohtml.InputSystem.InputBase.ProcessMouseEvent

function ProcessKeyEvent

virtual override KeyEvent ProcessKeyEvent()

Processes the current keyboard event.

Reimplements: cohtml.InputSystem.InputBase.ProcessKeyEvent

function ProcessTouchEvent

void ProcessTouchEvent()

Processes the current touch event.

Protected Functions Documentation

function GetMouseModifiers

virtual override EventMouseModifiersState GetMouseModifiers()

Reimplements: cohtml.InputSystem.InputBase.GetMouseModifiers

function GetKeyboardModifiers

virtual override EventModifiersState GetKeyboardModifiers()

Reimplements: cohtml.InputSystem.InputBase.GetKeyboardModifiers

function IsNumPadKey

virtual override bool IsNumPadKey(
    int keyCode
)

Reimplements: cohtml.InputSystem.InputBase.IsNumPadKey

function MapUnityCodesWithSystemCodes

virtual override void MapUnityCodesWithSystemCodes()

Reimplements: cohtml.InputSystem.InputBase.MapUnityCodesWithSystemCodes

Protected Attributes Documentation

variable KeyRepeatDelay

const float KeyRepeatDelay = 0.5f;

variable KeyRepeatRate

const float KeyRepeatRate = 0.033f;