mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-11 10:39:56 -05:00
add BlockUtility.yieldTick
This commit is contained in:
parent
84705fc463
commit
9311a274d5
1 changed files with 7 additions and 0 deletions
|
@ -57,6 +57,13 @@ class BlockUtility {
|
|||
this.thread.status = Thread.STATUS_YIELD;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the thread to yield until the next tick of the runtime.
|
||||
*/
|
||||
yieldTick () {
|
||||
this.thread.status = Thread.STATUS_YIELD_TICK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start a branch in the current block.
|
||||
* @param {number} branchNum Which branch to step to (i.e., 1, 2).
|
||||
|
|
Loading…
Reference in a new issue