examples/xbox_360_controller.rb in artoo-joystick-0.2.0 vs examples/xbox_360_controller.rb in artoo-joystick-0.3.0

- old
+ new

@@ -2,11 +2,14 @@ connection :joystick, :adaptor => :joystick device :controller, :driver => :xbox360, :connection => :joystick, :interval => 0.1 work do - on controller, :joystick => proc { |*value| - puts "joystick #{value[1][:s]} x:#{value[1][:x]} y:#{value[1][:y]}" + on controller, :joystick_0 => proc { |*value| + puts "joystick 0 - x:#{value[1][:x]} y:#{value[1][:y]}" + } + on controller, :joystick_1 => proc { |*value| + puts "joystick 1 - x:#{value[1][:x]} y:#{value[1][:y]}" } on controller, :button_a => proc { |*value| puts "ayyyy!" } on controller, :button_b => proc { |*value|