Skip to content

Commit c692334

Browse files
committed
gdx_forのブロックを作りました。
1 parent fce1cf9 commit c692334

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/lib/ruby-generator/gdx_for.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Define Ruby code generator for Go Direct Force & Acceleration Blocks
3+
* @param {RubyGenerator} Generator The RubyGenerator
4+
* @return {RubyGenerator} same as param.
5+
*/
6+
export default function (Generator) {
7+
8+
Generator.gdxfor_getForce = function(){
9+
return [`gdx_for_force`, Generator.ORDER_ATOMIC];
10+
};
11+
12+
return Generator;
13+
}

src/lib/ruby-generator/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ import TranslateBlocks from './translate.js';
2424
import MakeyMakeyBlocks from './makeymakey.js';
2525
import MicrobitBlocks from './microbit.js';
2626
import BoostBlocks from './boost.js';
27-
import EV3Blocks from './ev3.js'
27+
import EV3Blocks from './ev3.js';
2828
import WeDo2Blocks from './wedo2.js';
29+
import GdxForBlocks from './gdx_for.js';
2930

3031
const SCALAR_TYPE = '';
3132
const LIST_TYPE = 'list';
@@ -454,5 +455,6 @@ MicrobitBlocks(RubyGenerator);
454455
BoostBlocks(RubyGenerator);
455456
EV3Blocks(RubyGenerator);
456457
WeDo2Blocks(RubyGenerator);
458+
GdxForBlocks(RubyGenerator);
457459

458460
export default RubyGenerator;

0 commit comments

Comments
 (0)