Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface INativeInput

Interface for NativeInput object

Hierarchy

Index

Properties

onDeviceConnectedSearch playground for onDeviceConnected

onDeviceConnected: (deviceType: DeviceType, deviceSlot: number) => void

Callback for when a device is connected

Type declaration

    • (deviceType: DeviceType, deviceSlot: number): void
    • Parameters

      Returns void

onDeviceDisconnectedSearch playground for onDeviceDisconnected

onDeviceDisconnected: (deviceType: DeviceType, deviceSlot: number) => void

Callback for when a device is disconnected

Type declaration

    • (deviceType: DeviceType, deviceSlot: number): void
    • Parameters

      Returns void

onInputChangedSearch playground for onInputChanged

onInputChanged: (deviceType: DeviceType, deviceSlot: number, inputIndex: number, previousState: Nullable<number>, currentState: Nullable<number>, eventData?: any) => void

Callback for when input is changed on a device

Type declaration

    • (deviceType: DeviceType, deviceSlot: number, inputIndex: number, previousState: Nullable<number>, currentState: Nullable<number>, eventData?: any): void
    • Parameters

      • deviceType: DeviceType
      • deviceSlot: number
      • inputIndex: number
      • previousState: Nullable<number>
      • currentState: Nullable<number>
      • Optional eventData: any

      Returns void

Methods

disposeSearch playground for dispose

  • dispose(): void
  • Releases all held resources

    Returns void

isDeviceAvailableSearch playground for isDeviceAvailable

  • isDeviceAvailable(deviceType: DeviceType): boolean
  • Check for a specific device in the DeviceInputSystem

    Parameters

    • deviceType: DeviceType

      Type of device to check for

    Returns boolean

    bool with status of device's existence

pollInputSearch playground for pollInput

  • pollInput(deviceType: DeviceType, deviceSlot: number, inputIndex: number): number
  • Checks for current device input value, given an id and input index.

    Parameters

    • deviceType: DeviceType

      Type of device

    • deviceSlot: number

      "Slot" or index that device is referenced in

    • inputIndex: number

      Id of input to be checked

    Returns number

    Current value of input

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method