scratch-vm/src/engine/variable.js

25 lines
556 B
JavaScript
Raw Normal View History

/**
* @fileoverview
* Object representing a Scratch variable.
*/
2017-04-17 19:42:48 -04:00
class Variable {
/**
* @param {!string} name Name of the variable.
* @param {(string|number)} value Value of the variable.
* @param {boolean} isCloud Whether the variable is stored in the cloud.
* @constructor
*/
constructor (name, value, isCloud) {
this.name = name;
this.value = value;
this.isCloud = isCloud;
}
toXML () {
return `<variable type="">${this.name}</variable>`;
}
2017-04-17 19:42:48 -04:00
}
module.exports = Variable;