Refactor frontend to use commands
This commit is contained in:
parent
be26ab422c
commit
503c99cb1f
25 changed files with 8031 additions and 23084 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue