Solve serialization
This commit is contained in:
parent
ba8b1a29fd
commit
8e44dd3733
45 changed files with 242 additions and 201 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Command, CommandReceiver, TransportEvents } from 'shared';
|
||||
import { Command, CommandReceiver, serialize, TransportEvents } from 'shared';
|
||||
|
||||
export class CommandReceiverSocket extends CommandReceiver {
|
||||
constructor(private readonly socket: SocketIOClient.Socket) {
|
||||
|
|
@ -6,6 +6,6 @@ export class CommandReceiverSocket extends CommandReceiver {
|
|||
}
|
||||
|
||||
protected defaultCommandExecutor(command: Command) {
|
||||
this.socket.emit(TransportEvents.PlayerToServer, JSON.stringify(command));
|
||||
this.socket.emit(TransportEvents.PlayerToServer, serialize(command));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue