1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- 'use strict';
- goog.provide('Blockly.Blocks.robot');
- goog.require('Blockly.Blocks');
- /* Blockly.Blocks['robot_biped_init'] = {
- init: function() {
- this.appendDummyInput()
- .appendField(Blockly.Msg.MOTOR_BIPED_SETUP);
- this.appendDummyInput()
- .appendField(Blockly.Msg.LED_SET_WORD + " PIN_RR " + Blockly.Msg.MOTOR_AS)
- .appendField(new Blockly.FieldTextInput("11"), "pin_rr");
- this.appendDummyInput()
- .appendField(Blockly.Msg.LED_SET_WORD + " PIN_RL " + Blockly.Msg.MOTOR_AS)
- .appendField(new Blockly.FieldTextInput("10"), "pin_rl");
- this.appendDummyInput()
- .appendField(Blockly.Msg.LED_SET_WORD + " PIN_YR " + Blockly.Msg.MOTOR_AS)
- .appendField(new Blockly.FieldTextInput("6"), "pin_yr");
- this.appendDummyInput()
- .appendField(Blockly.Msg.LED_SET_WORD + " PIN_YL " + Blockly.Msg.MOTOR_AS)
- .appendField(new Blockly.FieldTextInput("9"), "pin_yl");
- this.appendDummyInput()
- .appendField(Blockly.Msg.LED_SET_WORD + " INTERVALTIME " + Blockly.Msg.MOTOR_AS)
- .appendField(new Blockly.FieldTextInput("10.0"), "intervaltime");
- //this.setPreviousStatement(true, null);
- this.setNextStatement(true, 'biped_movement');
- this.setColour(180);
- this.setTooltip('');
- this.setHelpUrl('');
- }
- };
- Blockly.Blocks['robot_biped_movement'] = {
- init: function() {
- this.appendDummyInput()
- .appendField(Blockly.Msg.MOTOR_MOVEMENT + " --")
- .appendField(new Blockly.FieldDropdown([["Going Up","goingUp(t*2);"], ["Drunk","drunk(t*4);"], ["No Gravity","noGravity(t*2);"], ["Kick Left","kickLeft(t);"], ["Kick Right","kickRight(t);"], ["Run","run(4, t*2);"], ["Walk","walk(4, t*2);"], ["Back Yard","backyard(2, t*2);"], ["Back Yard Slow","backyardSlow(2, t*2);"], ["Turn Left","turnLeft(4, t*2);"], ["Turn RIGHT","turnRight(4, t*2);"], ["Moon Walk Left","moonWalkLeft(4, t*2);"], ["Moon Walk RIGHT","moonWalkRight(4, t*2);"], ["Crusaito","crusaito(4, t*2);"], ["Swing","swing(4, t*2);"], ["Up Down","upDown(4, t*2);"], ["Flapping","flapping(4, t*2);"], ["Segunda Parte", "segunda_parte();"], ["Primera Parte", "primera_parte();"]]), "robot_biped_movement");
- this.setPreviousStatement(true, 'biped_movement');
- this.setNextStatement(true, ['biped_movement','biped_initialize']);
- this.setColour(180);
- this.setTooltip('');
- this.setHelpUrl('');
- }
- };
- Blockly.Blocks['robot_biped_initialize'] = {
- init: function() {
- this.appendDummyInput()
- .appendField(Blockly.Msg.MOTOR_INITIALIZE);
- this.setPreviousStatement(true, 'biped_initialize');
- this.setColour(180);
- this.setTooltip('');
- this.setHelpUrl('');
- }
- };
- */
|