Refactor frontend to use commands

This commit is contained in:
Schmelczer András 2020-11-06 19:56:09 +01:00
parent be26ab422c
commit 503c99cb1f
25 changed files with 8031 additions and 23084 deletions

View file

@ -67,7 +67,7 @@ export class GameServer {
socket.on(TransportEvents.PlayerToServer, (json: string) => {
try {
const commands: Array<Command> = deserialize(json);
commands.forEach((c) => player.sendCommand(c));
commands.forEach((c) => player.handleCommand(c));
} catch (e) {
console.error('Error while processing command', e);
}