mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-05-15 16:01:07 -04:00
Hack for getting argument values
This commit is contained in:
parent
654468a139
commit
8facd64376
1 changed files with 13 additions and 1 deletions
|
@ -159,8 +159,20 @@ Sequencer.prototype.stepThread = function (thread) {
|
|||
switchedStack = true;
|
||||
};
|
||||
|
||||
// @todo
|
||||
// @todo extreme hack to get the single argument value for prototype
|
||||
var argValues = [];
|
||||
var blockInputs = this.runtime.blocks[currentBlock].fields;
|
||||
for (var bi in blockInputs) {
|
||||
var outer = blockInputs[bi];
|
||||
for (var b in outer.blocks) {
|
||||
var block = outer.blocks[b];
|
||||
var fields = block.fields;
|
||||
for (var f in fields) {
|
||||
var field = fields[f];
|
||||
argValues.push(field.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!opcode) {
|
||||
console.warn('Could not get opcode for block: ' + currentBlock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue