Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    GamePadDeviceBase Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll
    System.Object → GamePadDeviceBase
    Derived from GamePadDeviceBase: GamePadFromLayout GamePadSimulated

    public abstract class GamePadDeviceBase : IGamePadDevice, IInputDevice
    Name Description
    Constructors
    GamePadDeviceBase()
    Properties
    CanChangeIndex
    DownButtons
    Id
    Index
    Name
    PressedButtons
    Priority
    ProductId
    ReleasedButtons
    Source
    State
    Methods
    ClearButtonStates()

    Clears previous Pressed/Released states

    SetIndexInternal(Int32, Boolean)
    SetVibration(Single, Single, Single, Single)
    Update(List<InputEvent>)
    UpdateButtonState(GamePadButtonEvent)

    Updates Pressed/Released/Down collections

    Events
    IndexChanged
    | Improve this Doc View Source

    Constructors


    GamePadDeviceBase()

    protected GamePadDeviceBase()
    | Improve this Doc View Source

    Properties


    CanChangeIndex

    public bool CanChangeIndex { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    DownButtons

    public IReadOnlySet<GamePadButton> DownButtons { get; }
    Property Value
    Type Description
    IReadOnlySet<GamePadButton>

    Id

    public abstract Guid Id { get; }
    Property Value
    Type Description
    System.Guid

    Index

    public int Index { get; set; }
    Property Value
    Type Description
    System.Int32

    Name

    public abstract string Name { get; }
    Property Value
    Type Description
    System.String

    PressedButtons

    public IReadOnlySet<GamePadButton> PressedButtons { get; }
    Property Value
    Type Description
    IReadOnlySet<GamePadButton>

    Priority

    public int Priority { get; set; }
    Property Value
    Type Description
    System.Int32

    ProductId

    public abstract Guid ProductId { get; }
    Property Value
    Type Description
    System.Guid

    ReleasedButtons

    public IReadOnlySet<GamePadButton> ReleasedButtons { get; }
    Property Value
    Type Description
    IReadOnlySet<GamePadButton>

    Source

    public abstract IInputSource Source { get; }
    Property Value
    Type Description
    IInputSource

    State

    public abstract GamePadState State { get; }
    Property Value
    Type Description
    GamePadState
    | Improve this Doc View Source

    Methods


    ClearButtonStates()

    Clears previous Pressed/Released states

    protected void ClearButtonStates()

    SetIndexInternal(Int32, Boolean)

    protected void SetIndexInternal(int newIndex, bool isDeviceSideChange = true)
    Parameters
    Type Name Description
    System.Int32 newIndex
    System.Boolean isDeviceSideChange

    SetVibration(Single, Single, Single, Single)

    public abstract void SetVibration(float smallLeft, float smallRight, float largeLeft, float largeRight)
    Parameters
    Type Name Description
    System.Single smallLeft
    System.Single smallRight
    System.Single largeLeft
    System.Single largeRight

    Update(List<InputEvent>)

    public abstract void Update(List<InputEvent> inputEvents)
    Parameters
    Type Name Description
    System.Collections.Generic.List<InputEvent> inputEvents

    UpdateButtonState(GamePadButtonEvent)

    Updates Pressed/Released/Down collections

    protected void UpdateButtonState(GamePadButtonEvent evt)
    Parameters
    Type Name Description
    GamePadButtonEvent evt
    | Improve this Doc View Source

    Events


    IndexChanged

    public event EventHandler<GamePadIndexChangedEventArgs> IndexChanged
    Event Type
    Type Description
    System.EventHandler<GamePadIndexChangedEventArgs>

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    GamePadDeviceExtensions.SetVibration(IGamePadDevice, Single)
    GamePadDeviceExtensions.SetVibration(IGamePadDevice, Single, Single)
    GamePadDeviceExtensions.IsButtonPressed(IGamePadDevice, GamePadButton)
    GamePadDeviceExtensions.IsButtonReleased(IGamePadDevice, GamePadButton)
    GamePadDeviceExtensions.IsButtonDown(IGamePadDevice, GamePadButton)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation