mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-27 06:29:25 -04:00
Clones (#150)
* Provide property to Clone to distinguish "original" clones * Provide method to clone a clone's properties * Don't report clones in the UI target list * Add target info to Thread * Allow hats to skip clones (for green flag) * Green flag skips clones * Implement "create clone" and hat * Pass the runtime to sprites and clones (for start hats) * Clone disposal; trigger hats after drawable initializes. * Separate stop threads for target; fix handling of stop button * Remove extraneous `skipClones` property * Add global clone limit * Don't allow a non-clone to delete itself. * Rename `cloneClone` -> `makeClone` * Variable updates in runtime.js * Synchronous drawable initialization (until we put it back to promises)
This commit is contained in:
parent
542899949e
commit
9744bcbb70
10 changed files with 229 additions and 37 deletions
src/engine
|
@ -16,7 +16,7 @@ var isPromise = function (value) {
|
|||
*/
|
||||
var execute = function (sequencer, thread) {
|
||||
var runtime = sequencer.runtime;
|
||||
var target = runtime.targetForThread(thread);
|
||||
var target = thread.target;
|
||||
|
||||
// Current block to execute is the one on the top of the stack.
|
||||
var currentBlockId = thread.peekStack();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue