Listens to the movement of the current user and calls the callback. Sends an event when the user stops moving, changes direction and every 200ms when moving in the same direction.
The event has the following attributes :
***moving (boolean):****true** when the current player is moving, **false** otherwise.
***direction (string):****"right"** | **"left"** | **"down"** | **"top"** the direction where the current player is moving.
***x (number):** coordinate X of the current player.
Similarly to maps (see [API state related functions](api-state.md)), it is possible to store data **related to a specific player** in a "state". Such data will be stored using the local storage from the user's browser.
Any value that is serializable in JSON can be stored.
### Setting a property
A player property can be set simply by assigning a value.
Example:
```javascript
WA.player.state.toto = "value" //will set the "toto" key to "value"
```
### Reading a property
A player property can be read by calling its key from the player's state.