Add minification

This commit is contained in:
schmelczerandras 2020-10-07 14:13:22 +02:00
parent b3da27e73b
commit d34f25295c
14 changed files with 142 additions and 94 deletions

View file

@ -56,7 +56,7 @@ export class Game {
this.socket.on(TransportEvents.ServerToPlayer, (serialized: string) => {
const command = deserialize(serialized);
console.log(command);
//console.log(command);
this.gameObjects.sendCommand(command);
});

View file

@ -38,14 +38,15 @@ export class GameObjectContainer extends CommandReceiver {
[DeleteObjectsCommand.type]: (c: DeleteObjectsCommand) =>
c.ids.forEach((id: Id) => this.objects.delete(id)),
[UpdateObjectsCommand.type]: (c: UpdateObjectsCommand) =>
[UpdateObjectsCommand.type]: (c: UpdateObjectsCommand) => {
c.objects.forEach((o) => {
this.objects.delete(o.id);
this.addObject(o);
if (o.id === this.player.id) {
this.player = o as CharacterView;
}
}),
});
},
};
protected defaultCommandExecutor(c: Command) {