Class: Rubygame::JoyDownEvent
Overview
Indicates that a Joystick button was pressed.
This event has these attributes:
- joynum
-
the identifier number of the affected Joystick.
- hat
-
the identifier number of the button.
Instance Attribute Summary collapse
-
#button ⇒ Object
Returns the value of attribute button.
-
#joynum ⇒ Object
Returns the value of attribute joynum.
Instance Method Summary collapse
-
#initialize(joy, button) ⇒ JoyDownEvent
constructor
A new instance of JoyDownEvent.
Constructor Details
#initialize(joy, button) ⇒ JoyDownEvent
Returns a new instance of JoyDownEvent.
377 378 379 380 381 382 |
# File 'lib/rubygame/event.rb', line 377 def initialize(joy,) # eventually, joy could be int OR a Rubygame::Joystick instance, # which would be stored as joy or maybe joyinstance? @joynum = joy = end |
Instance Attribute Details
#button ⇒ Object
Returns the value of attribute button.
376 377 378 |
# File 'lib/rubygame/event.rb', line 376 def end |
#joynum ⇒ Object
Returns the value of attribute joynum.
376 377 378 |
# File 'lib/rubygame/event.rb', line 376 def joynum @joynum end |