Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    GameControllerExtensions Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll
    System.Object → GameControllerExtensions
    Derived from GameControllerExtensions:

    public static class GameControllerExtensions
    Name Description
    Methods
    GetAxisCount(IGameControllerDevice)

    Gets the number of axes on this gamepad

    GetButtonCount(IGameControllerDevice)

    Gets the number of buttons on this gamepad

    GetDirectionCount(IGameControllerDevice)

    Gets the number of direction inputs on this gamepad

    GetDPad(IGameControllerDevice, Int32)

    Returns the value of a direction controller converted to a GamePadButton which has the matching Pad flags set

    | Improve this Doc View Source

    Methods


    GetAxisCount(IGameControllerDevice)

    Gets the number of axes on this gamepad

    public static int GetAxisCount(this IGameControllerDevice device)
    Parameters
    Type Name Description
    IGameControllerDevice device

    The gamepad

    Returns
    Type Description
    System.Int32

    The number of axes


    GetButtonCount(IGameControllerDevice)

    Gets the number of buttons on this gamepad

    public static int GetButtonCount(this IGameControllerDevice device)
    Parameters
    Type Name Description
    IGameControllerDevice device

    The gamepad

    Returns
    Type Description
    System.Int32

    The number of buttons


    GetDirectionCount(IGameControllerDevice)

    Gets the number of direction inputs on this gamepad

    public static int GetDirectionCount(this IGameControllerDevice device)
    Parameters
    Type Name Description
    IGameControllerDevice device

    The gamepad

    Returns
    Type Description
    System.Int32

    The number of direction controllers


    GetDPad(IGameControllerDevice, Int32)

    Returns the value of a direction controller converted to a GamePadButton which has the matching Pad flags set

    public static GamePadButton GetDPad(this IGameControllerDevice device, int index)
    Parameters
    Type Name Description
    IGameControllerDevice device

    The gamepad

    System.Int32 index

    The index of the direction controller

    Returns
    Type Description
    GamePadButton

    • Improve this Doc
    • View Source
    In This Article

    Back to top

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