Commit graph

6 commits

Author SHA1 Message Date
Benedicte Quimbert bf69b55e99 Creates player state and uses it to get and set values from local storage 2021-11-25 10:55:54 +01:00
David Négrier a0d3685227 Fixing "has/in" on variables proxy object
When using WA.state, using `"myVariable" in WA.state` would always return false.
This is now fixed by adding a "has" method on the Proxy class.

Also, added a `WA.state.hasVariable` method.
2021-08-27 11:29:59 +02:00
David Négrier 2aba6b1c27 Fixing loop when setting variables
Setting a variable would makes the application enter in an infinite loop of events (between all the scripts and the back)
This fix makes sure a variable does not emit any event if it is changed to a value it already has.
2021-07-23 11:51:01 +02:00
David Négrier 84df25f863 Improving WA.state typings 2021-07-22 17:14:36 +02:00
David Négrier 52fd9067b8 Editing do to add "state" API doc 2021-07-08 11:46:30 +02:00
David Négrier b1cb12861f Migrating variables functions to the "state" namespace. 2021-07-07 22:14:59 +02:00