Add minification
This commit is contained in:
parent
b3da27e73b
commit
d34f25295c
14 changed files with 142 additions and 94 deletions
|
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue