Class: Rubygame::JoyUpEvent

Inherits:
Event
  • Object
show all
Defined in:
lib/rubygame/event.rb

Overview

Indicates that a Joystick button was released.

See JoyDownEvent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(joy, button) ⇒ JoyUpEvent

Returns a new instance of JoyUpEvent.



390
391
392
393
394
395
# File 'lib/rubygame/event.rb', line 390

def initialize(joy,button)
	# eventually, joy could be int OR a Rubygame::Joystick instance,
	# which would be stored as joy or maybe joyinstance?
	@joynum = joy
	@button = button
end

Instance Attribute Details

#buttonObject

Returns the value of attribute button.



389
390
391
# File 'lib/rubygame/event.rb', line 389

def button
  @button
end

#joynumObject

Returns the value of attribute joynum.



389
390
391
# File 'lib/rubygame/event.rb', line 389

def joynum
  @joynum
end