|
@ -113,7 +113,7 @@ var joystick_axes = { |
|
|
|
|
|
|
|
|
joystick.on('move', function(evt, data) { |
|
|
joystick.on('move', function(evt, data) { |
|
|
joystick_axes.x1 = data.vector.x; |
|
|
joystick_axes.x1 = data.vector.x; |
|
|
joystick_axes.y1 = data.vector.y; |
|
|
joystick_axes.y1 = -data.vector.y; |
|
|
joystick_axes.moved = true; |
|
|
joystick_axes.moved = true; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
@ -122,12 +122,13 @@ var joystick_axes = { |
|
|
mode: 'static', |
|
|
mode: 'static', |
|
|
//catchDistance: 150,
|
|
|
//catchDistance: 150,
|
|
|
position: {left: '50%', top: '50%'}, |
|
|
position: {left: '50%', top: '50%'}, |
|
|
color: 'red' |
|
|
color: 'red', |
|
|
|
|
|
locky: true |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
joystick2.on('move', function(evt, data) { |
|
|
joystick2.on('move', function(evt, data) { |
|
|
joystick_axes.x2 = data.vector.x; |
|
|
joystick_axes.x2 = data.vector.x; |
|
|
joystick_axes.y2 = data.vector.y; |
|
|
joystick_axes.y2 = -data.vector.y; |
|
|
joystick_axes.moved = true; |
|
|
joystick_axes.moved = true; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|