mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-03-13 17:04:39 -04:00
Add unique ID for Targets
This commit is contained in:
parent
b1a3026ea1
commit
2c6722b958
1 changed files with 10 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
var Blocks = require('./blocks');
|
||||
var uid = require('../util/uid');
|
||||
|
||||
/**
|
||||
* @fileoverview
|
||||
|
@ -14,6 +15,15 @@ function Target (blocks) {
|
|||
if (!blocks) {
|
||||
blocks = new Blocks(this);
|
||||
}
|
||||
/**
|
||||
* A unique ID for this target.
|
||||
* @type {string}
|
||||
*/
|
||||
this.id = uid();
|
||||
/**
|
||||
* Blocks run as code for this target.
|
||||
* @type {!Blocks}
|
||||
*/
|
||||
this.blocks = blocks;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue