cohtml.InputSystem.GamepadMapGeneric

Inherits from cohtml.InputSystem.GamepadMapper, cohtml.InputSystem.GamepadBase.GamepadMap

Public Functions

Name
GamepadMapGeneric(uint id, string name, int buttonsLength =ButtonsLength, int axesLength =AxesLength)

Public Attributes

Name
const PlatformPlatformType
override ProfileProfileType

Protected Attributes

Name
const intButtonsLength
const intAxesLength

Additional inherited members

Public Types inherited from cohtml.InputSystem.GamepadMapper

Name
enum classProfile { PlayStation, XBox, Stadia, Other}
The supported gamepad mapping profiles. Add a new one or use Other
enum classPlatform { Unknown, Windows, Mac, Linux, Android, IOS, Count}
Supported OS platforms. When a gamepad from another platform is present, it should be added here. The value Unknown should always be first, and Count should always remain last.

Protected Types inherited from cohtml.InputSystem.GamepadMapper

Name
enum classJSIndex { South, LeftStickX, East, LeftStickY, West, RightStickX, North, RightStickY, LeftBumper, RightBumper, LeftTrigger, RightTrigger, Select, Start, LeftStickPress, RightStickPress, DPadUp, DPadDown, DPadLeft, DPadRight, System, Extra1, Extra2}
Buttons and Axes displayed in the correct order in the array according to the W3C standard. Each number corresponds to the index in the array.

Public Functions inherited from cohtml.InputSystem.GamepadMapper

Name
virtual voidUpdateEntities()
Updates the array of buttons and axes based on the mapping.

Protected Functions inherited from cohtml.InputSystem.GamepadMapper

Name
GamepadMapper(uint id, string name, int buttonsLength =16, int axesLength =4)
stringMapButton(byte button)
stringMapAxis(byte axis)
virtual voidUpdateButtons()
Updates the array of buttons based on the mapping.
virtual voidUpdateDPad(string mapX, bool isInvertedX, string mapY, bool isInvertedY)
Most D-Pad buttons are mapped to 2 axes, but sometimes they are 4 buttons, sometimes are inverted axes, Provide a way to handle the buttons mapping.
virtual voidUpdateValue(float [] array, JSIndex jsIndex, float value)
A helper method used by all the above methods to update the value of provided array index.

Public Attributes inherited from cohtml.InputSystem.GamepadMapper

Name
const stringCohtmlGamepadStr
readonly stringCohtmlGamepadAxisName
readonly stringJoystickButtonName

Protected Attributes inherited from cohtml.InputSystem.GamepadMapper

Name
Dictionary< JSIndex, string >m_ButtonsMap
Dictionary< JSIndex, string >m_AxesMap
floatm_FloatValue
JSIndexm_JsIndex

Public Functions inherited from cohtml.InputSystem.GamepadBase.GamepadMap

Name
GamepadMap(uint id, string name, int buttonsLength, int axesLength)

Public Attributes inherited from cohtml.InputSystem.GamepadBase.GamepadMap

Name
uintId
The identification of the gamepad.
stringName
The name of the gamepad.
float []Buttons
An array representing the state of the gamepad buttons.
float []Axes
An array representing the state of the gamepad axes.
HashSet< CohtmlUISystem >RegisteredInSystems
A collection storing the CohtmlUISystem’s that registered this gamepad.

Public Functions Documentation

function GamepadMapGeneric

GamepadMapGeneric(
    uint id,
    string name,
    int buttonsLength =ButtonsLength,
    int axesLength =AxesLength
)

Public Attributes Documentation

variable PlatformType

const Platform PlatformType = Platform.Unknown;

variable ProfileType

override Profile ProfileType => Profile.Other;

Protected Attributes Documentation

variable ButtonsLength

const int ButtonsLength = 10;

variable AxesLength

const int AxesLength = 2;