mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Implement all-at-once block
This commit is contained in:
parent
23e72525bf
commit
b6cb198144
2 changed files with 15 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -874,6 +874,15 @@ const specMap = {
|
|||
argMap: [
|
||||
]
|
||||
},
|
||||
'warpSpeed': {
|
||||
opcode: 'control_all_at_once',
|
||||
argMap: [
|
||||
{
|
||||
type: 'input',
|
||||
inputName: 'SUBSTACK'
|
||||
}
|
||||
]
|
||||
},
|
||||
'touching:': {
|
||||
opcode: 'sensing_touchingobject',
|
||||
argMap: [
|
||||
|
|
Loading…
Reference in a new issue