Implement all-at-once block

This commit is contained in:
Florrie 2018-04-30 12:18:38 -03:00
parent 23e72525bf
commit b6cb198144
2 changed files with 15 additions and 1 deletions

View file

@ -35,7 +35,8 @@ class Scratch3ControlBlocks {
control_delete_this_clone: this.deleteClone,
control_get_counter: this.getCounter,
control_incr_counter: this.incrCounter,
control_clear_counter: this.clearCounter
control_clear_counter: this.clearCounter,
control_all_at_once: this.allAtOnce
};
}
@ -182,6 +183,10 @@ class Scratch3ControlBlocks {
incrCounter () {
this._counter++;
}
allAtOnce (args, util) {
util.startBranch(1, false);
}
}
module.exports = Scratch3ControlBlocks;

View file

@ -874,6 +874,15 @@ const specMap = {
argMap: [
]
},
'warpSpeed': {
opcode: 'control_all_at_once',
argMap: [
{
type: 'input',
inputName: 'SUBSTACK'
}
]
},
'touching:': {
opcode: 'sensing_touchingobject',
argMap: [