Class

GCExtendedGamepad

A GCExtendedGamepad object implements a logical profile for a set of gamepad controls. A profile maps the hardware controls of a particular controller to a set of elements usable by your game.

Overview

The controls associated with the extended gamepad profile include the following:

  • Two shoulder buttons.

  • Two triggers.

  • Four face buttons arranged in a diamond pattern.

  • One directional pad.

  • Two thumbsticks.

Symbols

Determining the Controller That Owns This Profile

var controller: GCController?

The controller this profile is associated with.

Determining When Any Element in the Profile Changes

var valueChangedHandler: GCExtendedGamepadValueChangedHandler?

A block called when any element in the profile changes values.

Reading Shoulder Button Inputs

var leftShoulder: GCControllerButtonInput

The left shoulder button element.

var rightShoulder: GCControllerButtonInput

The right shoulder button element.

Reading Directional Pad Inputs

Reading Face Button Inputs

Reading Thumbstick Inputs

Reading Trigger Inputs

Saving a Snapshot

func saveSnapshot()

Saves a snapshot of all of the profile’s elements.

Constants

GCExtendedGamepadValueChangedHandler

Signature for the block executed if any element in the extended gamepad profile changes value.

Relationships

Inherits From

Conforms To