-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: player connection status (#44)
* add player joined team event * update GamePlayer model * add GameRunner player events
- Loading branch information
1 parent
fd733df
commit f6f613a
Showing
5 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { prop } from '@typegoose/typegoose'; | ||
import { PlayerConnectionStatus } from './player-connection-status'; | ||
|
||
export class GamePlayer { | ||
@prop({ required: true }) | ||
public playerId!: string; | ||
playerId!: string; | ||
|
||
@prop({ required: true }) | ||
public teamId!: string; | ||
teamId!: string; | ||
|
||
@prop({ required: true }) | ||
public gameClass: string; | ||
gameClass: string; | ||
|
||
@prop({ default: 'active' }) | ||
public status: 'active' | 'waiting for substitute' | 'replaced'; | ||
status: 'active' | 'waiting for substitute' | 'replaced'; | ||
|
||
@prop({ default: 'offline' }) | ||
connectionStatus: PlayerConnectionStatus; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type PlayerConnectionStatus = 'offline' | 'joining' | 'connected'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters