Show / Hide Table of Contents

Class GamePadDeviceImp

Implements a gamepad control option only works for XBox Gamepads

Inheritance
System.Object
GamePadDeviceImp
Implements
IInputDeviceImp
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Imp.Graphics.Desktop
Assembly: Fusee.Engine.Imp.Graphics.Desktop.dll
Syntax
public class GamePadDeviceImp : IInputDeviceImp
Remarks

The current implementation does not fire the NewDeviceConnected and DeviceDisconnected events. This driver will always report one connected GamePad no matter how many physical devices are connected to the machine. If no physical GamePad is present all of its axes and buttons will return 0 or false.

Properties

AxesCount

Returns Number of Axes.

Declaration
public int AxesCount { get; }
Property Value
Type Description
System.Int32

AxisImpDesc

Returns description information for all axes.

Declaration
public IEnumerable<AxisImpDescription> AxisImpDesc { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<AxisImpDescription>

ButtonCount

Returns Number of Buttons.

Declaration
public int ButtonCount { get; }
Property Value
Type Description
System.Int32

ButtonImpDesc

A gamepad exposes 14 buttons.

Declaration
public IEnumerable<ButtonImpDescription> ButtonImpDesc { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ButtonImpDescription>

Category

Returns Type of input device.

Declaration
public DeviceCategory Category { get; }
Property Value
Type Description
DeviceCategory

Desc

Description.

Declaration
public string Desc { get; }
Property Value
Type Description
System.String

Id

Returns Name of Device.

Declaration
public string Id { get; }
Property Value
Type Description
System.String

Methods

GetAxis(Int32)

Retrieves values for the X, Y and Trigger axes. No other axes are supported by this device.

Declaration
public float GetAxis(int iAxisId)
Parameters
Type Name Description
System.Int32 iAxisId

The axis to retrieve information for.

Returns
Type Description
System.Single

The value at the given axis.

GetButton(Int32)

Returns a Boolean Value for Controller Input.

Declaration
public bool GetButton(int iButtonId)
Parameters
Type Name Description
System.Int32 iButtonId
Returns
Type Description
System.Boolean

Events

AxisValueChanged

All axis are Poll based see GetAxis

Declaration
public event EventHandler<AxisValueChangedArgs> AxisValueChanged
Event Type
Type Description
System.EventHandler<AxisValueChangedArgs>

ButtonValueChanged

no Buttons implemented

Declaration
public event EventHandler<ButtonValueChangedArgs> ButtonValueChanged
Event Type
Type Description
System.EventHandler<ButtonValueChangedArgs>

Implements

IInputDeviceImp
Generated by DocFX
GitHub Repo
Back to top