Class: Ruby2D::Window::GamepadEvents::GamepadAxisData

Inherits:
Struct
  • Object
show all
Defined in:
lib/ruby2d/window/gamepad_events.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#axisObject

Returns the value of attribute axis

Returns:

  • (Object)

    the current value of axis



26
27
28
# File 'lib/ruby2d/window/gamepad_events.rb', line 26

def axis
  @axis
end

#gamepadObject

Returns the value of attribute gamepad

Returns:

  • (Object)

    the current value of gamepad



26
27
28
# File 'lib/ruby2d/window/gamepad_events.rb', line 26

def gamepad
  @gamepad
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



26
27
28
# File 'lib/ruby2d/window/gamepad_events.rb', line 26

def value
  @value
end

Instance Method Details

#axis?(name) ⇒ Boolean

Returns:

  • (Boolean)


28
# File 'lib/ruby2d/window/gamepad_events.rb', line 28

def axis?(name)     = axis == name

#gamepad?(other) ⇒ Boolean

Returns:

  • (Boolean)


27
# File 'lib/ruby2d/window/gamepad_events.rb', line 27

def gamepad?(other) = gamepad.equal?(other)