mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-29 23:49:21 -04:00
Create a new addTarget
function on the runtime which populates the targets list as well as the executable targets list.
This commit is contained in:
parent
fbee37e915
commit
59a865ef47
7 changed files with 21 additions and 24 deletions
src/engine
|
@ -1560,11 +1560,14 @@ class Runtime extends EventEmitter {
|
|||
}
|
||||
|
||||
/**
|
||||
* Add a target to the execution order.
|
||||
* @param {Target} executableTarget target to add
|
||||
* Add a target to the runtime. This tracks the sprite pane
|
||||
* ordering of the target. The target still needs to be put
|
||||
* into the correct execution order after calling this function.
|
||||
* @param {Target} target target to add
|
||||
*/
|
||||
addExecutable (executableTarget) {
|
||||
this.executableTargets.push(executableTarget);
|
||||
addTarget (target) {
|
||||
this.targets.push(target);
|
||||
this.executableTargets.push(target);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue