Skip to content
This repository was archived by the owner on Jan 5, 2022. It is now read-only.

Coding Reference

Jibran Syed edited this page Jun 27, 2017 · 12 revisions

<- Back to the Wiki

This page features all the enumerations and classes that exist in the XboxCtrlrInput namespace.

Enumerations

These enumerations exist in the XboxCtrlrInput namespace and are used to identify the different inputs of an Xbox 360 controller.

XboxButton Used to identify different Xbox buttons.
XboxDPad Used to refer to the four D-Pad directions.
XboxAxis Used to identify all of the Xbox's analog inputs.
XboxController Used to identify the controller number (aka player number).

The XCI Class

The XCI class is responsible for retrieving input from an Xbox 360 controller given a particular method and its parameters. The class contains the following:

Static Variables

There are none, as of yet anyway.

Static Functions

GetButton() Returns true if the specified button is held down.
GetButtonDown() Returns true at the frame the specified button starts to press down (not held down).
GetButtonUp() Returns true at the frame the specified button is released.
GetDPad() Returns true if the specified D-Pad direction is held down.
GetDPadDown() Returns true if the specified D-Pad direction starts to press down (not held down).
GetDPadUp() Returns true if the specified D-Pad direction is released.
GetAxis() Returns the analog number of the specified axis.
GetAxisRaw() Returns the analog number of the specified axis without Unity's smoothing filter.
GetNumPluggedCtrlrs() Returns the number of Xbox controllers plugged to the computer.
IsPluggedIn() WINDOWS ONLY! Checks if a specified controller is plugged in.
DEBUG_LogControllerNames() DEBUG function. Log all controller names to Unity's console.

Input Map

XboxInputMap

This is a map of all the inputs that XboxCtrlrInput intends on supporting. The purple labels are buttons, the orange labels are axis, and the cyan labels are the D-Pad directions.

<- Back to the Wiki

Clone this wiki locally