Straw-man implementation of targets/sprites/clones

This commit is contained in:
Tim Mickel 2016-06-29 13:48:30 -04:00
parent 1a48e75341
commit 809528abdc
7 changed files with 99 additions and 45 deletions
src/engine

20
src/engine/target.js Normal file
View file

@ -0,0 +1,20 @@
var Blocks = require('./blocks');
/**
* @fileoverview
* A Target is an abstract "code-running" object for the Scratch VM.
* Examples include sprites/clones or potentially physical-world devices.
*/
/**
* @param {?Blocks} blocks Blocks instance for the blocks owned by this target.
* @constructor
*/
function Target (blocks) {
if (!blocks) {
blocks = new Blocks(this);
}
this.blocks = blocks;
}
module.exports = Target;