mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-25 07:22:33 -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_delete_this_clone: this.deleteClone,
|
||||||
control_get_counter: this.getCounter,
|
control_get_counter: this.getCounter,
|
||||||
control_incr_counter: this.incrCounter,
|
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 () {
|
incrCounter () {
|
||||||
this._counter++;
|
this._counter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allAtOnce (args, util) {
|
||||||
|
util.startBranch(1, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = Scratch3ControlBlocks;
|
module.exports = Scratch3ControlBlocks;
|
||||||
|
|
|
@ -874,6 +874,15 @@ const specMap = {
|
||||||
argMap: [
|
argMap: [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
'warpSpeed': {
|
||||||
|
opcode: 'control_all_at_once',
|
||||||
|
argMap: [
|
||||||
|
{
|
||||||
|
type: 'input',
|
||||||
|
inputName: 'SUBSTACK'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
'touching:': {
|
'touching:': {
|
||||||
opcode: 'sensing_touchingobject',
|
opcode: 'sensing_touchingobject',
|
||||||
argMap: [
|
argMap: [
|
||||||
|
|
Loading…
Reference in a new issue