Checking some stuff
@@ -1,3 +1,63 @@
|
|||||||
# ModuleClientApi - GameLib Game
|
# ModuleClientApi - GameLib Game
|
||||||
|
|
||||||
Class representing the GameLib Game inside the ModuleServerAPI.
|
Class representing the GameLib Game inside the ModuleServerAPI.
|
||||||
|
|
||||||
|
## Methods
|
||||||
|
|
||||||
|
### start
|
||||||
|
|
||||||
|
Start the game, advertise it to the control and make player requesting possible.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
Game.start();
|
||||||
|
```
|
||||||
|
|
||||||
|
### stop
|
||||||
|
|
||||||
|
Stop the game, remove all players and stop advertising to the control.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
Game.stop();
|
||||||
|
```
|
||||||
|
|
||||||
|
## Scoreboard
|
||||||
|
|
||||||
|
### requestScoreboard
|
||||||
|
|
||||||
|
Get a scoreboard for the game.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
Game.requestScoreboard(details);
|
||||||
|
```
|
||||||
|
|
||||||
|
| Argument | Type | Description |
|
||||||
|
| -------- | ------------------------------------------------------------ | --------------------------------------------------------------------- |
|
||||||
|
| details | [ScoreboardDetails](ModuleServerAPIGameLibScoreboardDetails) | Simple object that specifies the style and behaviour of a scoreboard. |
|
||||||
|
|
||||||
|
**Return** [Scoreboard](./ModuleServerAPIGameLibScoreboard) _Scoreboard instance._
|
||||||
|
|
||||||
|
### setMainScoreboard
|
||||||
|
|
||||||
|
Set the main scoreboard for the game.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
Game.setMainScoreboard(scoreboard);
|
||||||
|
```
|
||||||
|
|
||||||
|
| Argument | Type | Description |
|
||||||
|
| ---------- | ------------------------------------------------------- | ------------------------------------- |
|
||||||
|
| scoreboard | [Scoreboard](ModuleServerAPIGameLibScoreboard) / string | Scoreboard instance or scoreboard id. |
|
||||||
|
|
||||||
|
## Players
|
||||||
|
|
||||||
|
### requestFromQueue
|
||||||
|
|
||||||
|
### removePlayer
|
||||||
|
|
||||||
|
### getPlayer
|
||||||
|
|
||||||
|
### getPlayers
|
||||||
|
|
||||||
|
### hasPlayer
|
||||||
|
|
||||||
|
## Events
|
||||||
|
|||||||
24
ModuleServerAPIGameLibScoreboardDetails.md
Normal file
24
ModuleServerAPIGameLibScoreboardDetails.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# ModuleServerApi - GameLib Scoreboard Details
|
||||||
|
|
||||||
|
Simple object that specifies the style and behaviour of a scoreboard.
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
```JSON
|
||||||
|
{
|
||||||
|
"id": "scoreboardId",
|
||||||
|
"name": "Scoreboard Name",
|
||||||
|
"formatting": "duration",
|
||||||
|
"sorting": "LOW_TO_HIGH",
|
||||||
|
"showCount": 10
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
| Attribute | Type | Description |
|
||||||
|
| ------------------- | ----------------------------- | ------------------------------------------------ |
|
||||||
|
| id | string | The id of the scoreboard. |
|
||||||
|
| name | string | The name of the scoreboard. |
|
||||||
|
| formatting | "number" / "duration" | The score formatting of the scoreboard. |
|
||||||
|
| scsortingoreboardId | "LOW_TO_HIGH" / "HIGH_TO_LOW" | The sorting of the scoreboard. |
|
||||||
|
| showCount | number | The amount of entries to show on the scoreboard. |
|
||||||
@@ -27,7 +27,8 @@
|
|||||||
- [Game](./ModuleServerAPIGameLibGame)
|
- [Game](./ModuleServerAPIGameLibGame)
|
||||||
- [GamePlayer](./ModuleServerAPIGameLibGamePlayer)
|
- [GamePlayer](./ModuleServerAPIGameLibGamePlayer)
|
||||||
- [Scoreboard](./ModuleServerAPIGameLibScoreboard)
|
- [Scoreboard](./ModuleServerAPIGameLibScoreboard)
|
||||||
- [Scoreboard State](./ModuleServerAPIGameLibScoreboardState)
|
- [Details](./ModuleServerAPIGameLibScoreboardDetails)
|
||||||
|
- [State](./ModuleServerAPIGameLibScoreboardState)
|
||||||
- [GameLib CollisionSpace](./ModuleServerAPIGameLibCollisionSpace)
|
- [GameLib CollisionSpace](./ModuleServerAPIGameLibCollisionSpace)
|
||||||
- [Libs](./ModuleServerAPILibs)
|
- [Libs](./ModuleServerAPILibs)
|
||||||
- [LibWebSocket](./ModuleServerAPILibsWebSocketLib)
|
- [LibWebSocket](./ModuleServerAPILibsWebSocketLib)
|
||||||
|
|||||||
Reference in New Issue
Block a user