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:
Karishma Chadha 2019-01-14 11:48:11 -05:00
parent fbee37e915
commit 59a865ef47
7 changed files with 21 additions and 24 deletions
src/engine

View file

@ -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);
}
/**