Player name, pwa & branding

This commit is contained in:
Thomas
2020-09-01 12:36:43 +02:00
parent 85a8139270
commit d8ce1001cb
46 changed files with 618 additions and 42 deletions

View File

@@ -32,9 +32,11 @@ public class SocketHandler extends TextWebSocketHandler {
String type = rootObject.getString("type");
switch (type) {
case "login":
gameManager.login(session, rootObject.getString("message"));
break;
case "update":
Player player = new ObjectMapper().readValue(rootObject.get("message").toString(), Player.class);
gameManager.updatePlayer(session, player);
break;
default:
@@ -45,7 +47,7 @@ public class SocketHandler extends TextWebSocketHandler {
@Override
public void afterConnectionEstablished(WebSocketSession session) throws Exception {
System.err.println("[WS] new connection " + this);
gameManager.login(session);
// gameManager.login(session);
}
@Override