mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-08 03:54:04 -04: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;
|
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.
|
* Start a branch in the current block.
|
||||||
* @param {number} branchNum Which branch to step to (i.e., 1, 2).
|
* @param {number} branchNum Which branch to step to (i.e., 1, 2).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue