Refactor
This commit is contained in:
parent
1ce961d6c2
commit
99cdb62928
2 changed files with 338 additions and 431 deletions
7
shared/src/communication/id.ts
Normal file
7
shared/src/communication/id.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export type Id = number | null;
|
||||
|
||||
let currentId = 0;
|
||||
|
||||
export const id = (): number => {
|
||||
return currentId++;
|
||||
};
|
||||
9
shared/src/communication/transport-events.ts
Normal file
9
shared/src/communication/transport-events.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
export enum TransportEvents {
|
||||
PlayerJoining = 'PlayerJoining',
|
||||
PlayerToServer = 'PlayerToServer',
|
||||
ServerToPlayer = 'ServerToPlayer',
|
||||
SubscribeForServerInfoUpdates = 'SubscribeForServerInfoUpdates',
|
||||
ServerInfoUpdate = 'ServerInfoUpdate',
|
||||
Ping = 'Ping',
|
||||
Pong = 'Pong',
|
||||
}
|
||||
Loading…
Reference in a new issue