In the case the reconnect event was triggered on "wake-up", the disconnect event was not sent. But because of a bug in the way we handle the setTimeout, the reconnection to the GameScene never happened after we forced the disconnect scene.
This fixes the issue.
Callbacks for socket.io events were registered each time a disconnect was called, leading to message being dispatched plenty of times if there was several disconnections.
In case we suspend a laptop and resume it, the RECONNECT event is called by socket.io without any error being thrown (so without us being redirected to the Reconnect Scene).
This fix makes sure we go to the reconnect scene before going back to the main scene.
If more than one tile was set in the "start" layer, the last tile would be selected.
Now, the tile is selected at random among available tiles.
Also, a message is issued if no tiles have been put on the "start" layer.
This is important because when we come back to the GameScene later, some properties of the GameScene object might be initialized with the values of the previous GameScene.
Like the position if the user previously disconnected.
Closes#146
Taking what was done in the LoginScene regarding character selection and putting it in its own scene.
Also, making character selection possible via the keyboard.
Remvoing messages that were no more used in the new messaging system (the code used to handle the message that sent the position of all users on the front side)
The URL signature becomes:
https://workadventu.re/_/[instance]/[path_to_map.json]
This allows us to create many instances of the same map (and therefore to create several different worlds for different people)
An exit on a map can target another "instance" by passing the "exitInstance" property.