Class GamePadDeviceImp
Gamepad input device implementation for the WebAsm platform.
Inheritance
System.Object
GamePadDeviceImp
Implements
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.Blazor
Assembly: Fusee.Engine.Imp.Graphics.Blazor.dll
Syntax
public class GamePadDeviceImp : IInputDeviceImp
Properties
AxesCount
How many axes do we have for this device?
Declaration
public int AxesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
AxisImpDesc
The axis description implementation
Declaration
public IEnumerable<AxisImpDescription> AxisImpDesc { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<AxisImpDescription> |
ButtonCount
How many buttons do we have for this device
Declaration
public int ButtonCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ButtonImpDesc
The button description implementation
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 the ID of the current controller
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
GetAxis(Int32)
All Axes on this Device are polled.
Declaration
public float GetAxis(int iAxisId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iAxisId | The Axis to be polled. |
Returns
Type | Description |
---|---|
System.Single | A float value between -1 and 1 determining the offset of the axis. |
GetButton(Int32)
All buttons on this device are polled.
Declaration
public bool GetButton(int iButtonId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iButtonId | The button to be polled. |
Returns
Type | Description |
---|---|
System.Boolean | A Boolean value determining whether the button is pressed or not. |
Events
AxisValueChanged
Called when the axis value changes
Declaration
public event EventHandler<AxisValueChangedArgs> AxisValueChanged
Event Type
Type | Description |
---|---|
System.EventHandler<AxisValueChangedArgs> |
ButtonValueChanged
Called when a button value changes
Declaration
public event EventHandler<ButtonValueChangedArgs> ButtonValueChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ButtonValueChangedArgs> |