mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-08-20 18:29:57 -04:00
Straw-man implementation of targets/sprites/clones
This commit is contained in:
parent
1a48e75341
commit
809528abdc
7 changed files with 99 additions and 45 deletions
src/engine
|
@ -106,7 +106,7 @@ Sequencer.prototype.stepToSubstack = function (thread, substackNum) {
|
|||
substackNum = 1;
|
||||
}
|
||||
var currentBlockId = thread.peekStack();
|
||||
var substackId = this.runtime.blocks.getSubstack(
|
||||
var substackId = this.runtime.targetForThread(thread).blocks.getSubstack(
|
||||
currentBlockId,
|
||||
substackNum
|
||||
);
|
||||
|
@ -153,7 +153,8 @@ Sequencer.prototype.proceedThread = function (thread) {
|
|||
// Pop from the stack - finished this level of execution.
|
||||
thread.popStack();
|
||||
// Push next connected block, if there is one.
|
||||
var nextBlockId = this.runtime.blocks.getNextBlock(currentBlockId);
|
||||
var nextBlockId = (this.runtime.targetForThread(thread).
|
||||
blocks.getNextBlock(currentBlockId));
|
||||
if (nextBlockId) {
|
||||
thread.pushStack(nextBlockId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue