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. | |
void | ProcessEvent(Event inputEvent) Processes the current UnityGUI event. |
virtual override MouseEvent | ProcessMouseEvent() Processes the current Unity3D mouse event. |
virtual override KeyEvent | ProcessKeyEvent() Processes the current keyboard event. |
void | ProcessTouchEvent() Processes the current touch event. |
Protected Functions
Name | |
---|---|
virtual override EventMouseModifiersState | GetMouseModifiers() |
virtual override EventModifiersState | GetKeyboardModifiers() |
virtual override bool | IsNumPadKey(int keyCode) |
virtual override void | MapUnityCodesWithSystemCodes() |
Protected Attributes
Name | |
---|---|
const float | KeyRepeatDelay |
const float | KeyRepeatRate |
Additional inherited members
Public Functions inherited from cohtml.InputSystem.InputBase
Name | |
---|---|
void | UpdateTouches(CohtmlView view, TouchEventData [] touchEventData, uint touchesCount) Updates the GestureManager’s with the states of the touch events that happened this frame. |
virtual KeyEventData.EventLocation | GetKeyLocation(int keyCode) Returns the key location of the provided key code. |
virtual EventModifiersState | UpdateKeyboardModifiers(bool isCtrlDown, bool isAltDown, bool isShiftDown, bool isNumLockDown, bool isCapsLockDown, bool isMetaDown, bool isAltGrDown) Updates the state of the keyboard key modifiers. |
virtual void | Dispose() |
InputBase | Initialize() Creates a InputSystem or InputManager instance based on which Unity3D input package is used. |
Protected Functions inherited from cohtml.InputSystem.InputBase
Name | |
---|---|
InputBase() | |
Vector2 | SetScrollData(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. |
GamepadBase | Gamepad 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 |
TouchEventCollection | s_TouchDataCached |
InputEventWrapper | m_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;