Adding variables (on the front side for now)
This commit is contained in:
parent
1806ef9d7e
commit
ea1460abaf
13 changed files with 453 additions and 68 deletions
11
maps/tests/Variables/script.js
Normal file
11
maps/tests/Variables/script.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
console.log('Trying to set variable "not_exists". This should display an error in the console.')
|
||||
WA.room.saveVariable('not_exists', 'foo');
|
||||
|
||||
console.log('Trying to set variable "config". This should work.');
|
||||
WA.room.saveVariable('config', {'foo': 'bar'});
|
||||
|
||||
console.log('Trying to read variable "config". This should display a {"foo": "bar"} object.');
|
||||
console.log(WA.room.loadVariable('config'));
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue