Updated variables and var_fire event listener.

This commit is contained in:
marisaleung 2017-06-15 14:29:15 -07:00
parent d9704b23c3
commit 875ccf5b88
10 changed files with 216 additions and 28 deletions
src/engine

View file

@ -137,7 +137,11 @@ const execute = function (sequencer, thread) {
// Add all fields on this block to the argValues.
for (const fieldName in fields) {
if (!fields.hasOwnProperty(fieldName)) continue;
argValues[fieldName] = fields[fieldName].value;
if (fieldName === 'VARIABLE') {
argValues[fieldName] = fields[fieldName].id;
} else {
argValues[fieldName] = fields[fieldName].value;
}
}
// Recursively evaluate input blocks.