Combine the JoinTeam event to the UpdatePlayer event
This commit is contained in:
parent
b1c161dcb3
commit
0971ffd150
2 changed files with 6 additions and 16 deletions
|
|
@ -1,14 +0,0 @@
|
||||||
# `JoinTeam`:
|
|
||||||
|
|
||||||
## Description:
|
|
||||||
This event is triggered by the client when the user attempts to join a team from the lobby.
|
|
||||||
|
|
||||||
## Request Payload:
|
|
||||||
| Property | Type | Description
|
|
||||||
| -------- | ---- | -----------
|
|
||||||
| team | int | The team to join. Accepted values are: `1`, and `2`, any other value will throw an error.
|
|
||||||
| role | String | The role the player is assuming. This can be `"writer"` or `"guesser"`, any other value will throw an error.
|
|
||||||
|
|
||||||
## Response Payload: (`JoinTeam`)
|
|
||||||
| Property | Type | Description
|
|
||||||
| -------- | ---- | -----------
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
# `UpdatePlayer`:
|
# `UpdatePlayer`:
|
||||||
|
|
||||||
## Description:
|
## Description:
|
||||||
This event is sent from the server and is a result of a player joining/changing team, this event is also fired when a new player joins the game.
|
This event is sent as a result of a player joining/changing team, this event is also fired when a new player joins the game. The client sends the event to update what team/role they are on.
|
||||||
|
|
||||||
## Request Payload:
|
## Request Payload:
|
||||||
The client cannot send this event and only receives it.
|
| Property | Type | Description
|
||||||
|
| -------- | ---- | -----------
|
||||||
|
| name | String | The player's name
|
||||||
|
| team | Integer | The team to join. Accepted values are: `1`, and `2`, any other value will throw an error.
|
||||||
|
| role | String | The role the player is assuming. This can be `"writer"` or `"guesser"`, any other value will throw an error.
|
||||||
|
|
||||||
## Response Payload:
|
## Response Payload:
|
||||||
| Property | Type | Description
|
| Property | Type | Description
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue