@@ -13,43 +13,71 @@ const GdxForConverter = {
13
13
case 'gdx_for_acceleration' :
14
14
if ( args . length === 1 ) {
15
15
block = this . _createBlock ( 'gdxfor_getAcceleration' , 'value' ) ;
16
- this . _addInput ( block , 'DIRECTION' , this . _createFieldBlock ( 'gdxfor_menu_axisOptions' , 'axisOptions' , args [ 0 ] ) ) ;
16
+ this . _addInput (
17
+ block ,
18
+ 'DIRECTION' ,
19
+ this . _createFieldBlock ( 'gdxfor_menu_axisOptions' , 'axisOptions' , args [ 0 ] )
20
+ ) ;
17
21
}
18
22
break ;
19
23
case 'gdx_for_force' :
20
24
block = this . _createBlock ( 'gdxfor_getForce' , 'value' ) ;
21
25
break ;
22
26
case 'gdx_for_tilted?' :
23
27
block = this . _createBlock ( 'gdxfor_isTilted' , 'value' ) ;
24
- this . _addInput ( block , 'TILT' , this . _createFieldBlock ( 'gdxfor_menu_tiltAnyOptions' , 'tiltAnyOptions' , args [ 0 ] ) ) ;
28
+ this . _addInput (
29
+ block ,
30
+ 'TILT' ,
31
+ this . _createFieldBlock ( 'gdxfor_menu_tiltAnyOptions' , 'tiltAnyOptions' , args [ 0 ] )
32
+ ) ;
25
33
break ;
26
34
case 'gdx_for_tilt_angle' :
27
35
block = this . _createBlock ( 'gdxfor_getTilt' , 'value' ) ;
28
- this . _addInput ( block , 'TILT' , this . _createFieldBlock ( 'gdxfor_menu_tiltOptions' , 'tiltOptions' , args [ 0 ] ) ) ;
36
+ this . _addInput (
37
+ block ,
38
+ 'TILT' ,
39
+ this . _createFieldBlock ( 'gdxfor_menu_tiltOptions' , 'tiltOptions' , args [ 0 ] )
40
+ ) ;
29
41
break ;
30
42
case 'gdx_for_falling?' :
31
43
block = this . _createBlock ( 'gdxfor_isFreeFalling' , 'value' ) ;
32
44
break ;
33
45
case 'gdx_for_spin_speed' :
34
46
block = this . _createBlock ( 'gdxfor_getSpinSpeed' , 'value' ) ;
35
- this . _addInput ( block , 'DIRECTION' , this . _createFieldBlock ( 'gdxfor_menu_axisOptions' , 'axisOptions' , args [ 0 ] ) ) ;
47
+ this . _addInput (
48
+ block ,
49
+ 'DIRECTION' ,
50
+ this . _createFieldBlock ( 'gdxfor_menu_axisOptions' , 'axisOptions' , args [ 0 ] )
51
+ ) ;
36
52
break ;
37
53
}
38
54
} else {
39
- switch ( args [ 0 ] . value ) {
55
+ switch ( args [ 0 ] . value ) {
40
56
case 'gdx_for_gesture' :
41
57
block = this . _createBlock ( 'gdxfor_whenGesture' , 'hat' ) ;
42
- this . _addInput ( block , 'GESTURE' , this . _createFieldBlock ( 'gdxfor_menu_gestureOptions' , 'gestureOptions' , args [ 1 ] ) ) ;
58
+ this . _addInput (
59
+ block ,
60
+ 'GESTURE' ,
61
+ this . _createFieldBlock ( 'gdxfor_menu_gestureOptions' , 'gestureOptions' , args [ 1 ] )
62
+ ) ;
43
63
this . _setParent ( rubyBlock , block ) ;
44
64
break ;
45
65
case 'gdx_force_sensor' :
46
66
block = this . _createBlock ( 'gdxfor_whenForcePushedOrPulled' , 'hat' ) ;
47
- this . _addInput ( block , 'PUSH_PULL' , this . _createFieldBlock ( 'gdxfor_menu_pushPullOptions' , 'pushPullOptions' , args [ 1 ] ) ) ;
67
+ this . _addInput (
68
+ block ,
69
+ 'PUSH_PULL' ,
70
+ this . _createFieldBlock ( 'gdxfor_menu_pushPullOptions' , 'pushPullOptions' , args [ 1 ] )
71
+ ) ;
48
72
this . _setParent ( rubyBlock , block ) ;
49
73
break ;
50
74
case 'gdx_for_tilted' :
51
75
block = this . _createBlock ( 'gdxfor_whenTilted' , 'hat' ) ;
52
- this . _addInput ( block , 'TILT' , this . _createFieldBlock ( 'gdxfor_menu_tiltAnyOptions' , 'tiltAnyOptions' , args [ 1 ] ) ) ;
76
+ this . _addInput (
77
+ block ,
78
+ 'TILT' ,
79
+ this . _createFieldBlock ( 'gdxfor_menu_tiltAnyOptions' , 'tiltAnyOptions' , args [ 1 ] )
80
+ ) ;
53
81
this . _setParent ( rubyBlock , block ) ;
54
82
break ;
55
83
}
0 commit comments