Table of Contents

Class GamePadSimulated

Namespace
Stride.Input
Assembly
Stride.Input.dll
public class GamePadSimulated : GamePadDeviceBase, IGamePadDevice, IInputDevice
Inheritance
GamePadSimulated
Implements
Inherited Members
Extension Methods

Constructors

GamePadSimulated(InputSourceSimulated)

public GamePadSimulated(InputSourceSimulated source)

Parameters

source InputSourceSimulated

Properties

Id

The unique identifier of this device

public override Guid Id { get; }

Property Value

Guid

Name

The name of the device

public override string Name { get; }

Property Value

string

ProductId

Product Id of the device

public override Guid ProductId { get; }

Property Value

Guid

Source

The input source the device belongs to.

public override IInputSource Source { get; }

Property Value

IInputSource

State

The state of the gamepad

public override GamePadState State { get; }

Property Value

GamePadState

Methods

SetAxis(GamePadAxis, float)

public void SetAxis(GamePadAxis axis, float value)

Parameters

axis GamePadAxis
value float

SetButton(GamePadButton, bool)

public void SetButton(GamePadButton button, bool state)

Parameters

button GamePadButton
state bool

SetVibration(float, float, float, float)

Sets 4 vibration motors one the device or approximates the effect if less are supported

public override void SetVibration(float smallLeft, float smallRight, float largeLeft, float largeRight)

Parameters

smallLeft float

The small left side motor

smallRight float

The small right side motor

largeLeft float

The large left side motor

largeRight float

The large right side motor

Remarks

Values range from 0 to 1, where 0 is off and 1 is maximum vibration

Update(List<InputEvent>)

Updates the input device, filling the list inputEvents with input events that were generated by this device this frame

public override void Update(List<InputEvent> inputEvents)

Parameters

inputEvents List<InputEvent>

A list that gets filled with input events that were generated since the last frame

Remarks

Input devices are always updated after their respective input source