Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    GameControllerDeviceExtensions Class

    Namespace: Stride.Input
    Assembly: Stride.Input.dll

    Provides easier ways to set vibration levels on a controller, rather than setting 4 motors

    System.Object → GameControllerDeviceExtensions
    Derived from GameControllerDeviceExtensions:

    public static class GameControllerDeviceExtensions
    Name Description
    Methods
    IsButtonDown(IGameControllerDevice, Int32)

    Determines whether the specified button is being pressed down

    IsButtonPressed(IGameControllerDevice, Int32)

    Determines whether the specified button is pressed since the previous update.

    IsButtonReleased(IGameControllerDevice, Int32)

    Determines whether the specified button is released since the previous update.

    | Improve this Doc View Source

    Methods


    IsButtonDown(IGameControllerDevice, Int32)

    Determines whether the specified button is being pressed down

    public static bool IsButtonDown(this IGameControllerDevice controller, int button)
    Parameters
    Type Name Description
    IGameControllerDevice controller

    The controller

    System.Int32 button

    The button

    Returns
    Type Description
    System.Boolean

    true if the specified button is being pressed down; otherwise, false.


    IsButtonPressed(IGameControllerDevice, Int32)

    Determines whether the specified button is pressed since the previous update.

    public static bool IsButtonPressed(this IGameControllerDevice controller, int button)
    Parameters
    Type Name Description
    IGameControllerDevice controller

    The controller

    System.Int32 button

    The button

    Returns
    Type Description
    System.Boolean

    true if the specified button is pressed; otherwise, false.


    IsButtonReleased(IGameControllerDevice, Int32)

    Determines whether the specified button is released since the previous update.

    public static bool IsButtonReleased(this IGameControllerDevice controller, int button)
    Parameters
    Type Name Description
    IGameControllerDevice controller

    The controller

    System.Int32 button

    The button

    Returns
    Type Description
    System.Boolean

    true if the specified button is released; otherwise, false.


    • Improve this Doc
    • View Source
    In This Article
    In This Article
    • Methods
      • IsButtonDown(IGameControllerDevice, Int32)
      • IsButtonPressed(IGameControllerDevice, Int32)
      • IsButtonReleased(IGameControllerDevice, Int32)

    Back to top

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