From 4ba4363fb716d2bd6729c8a246dd8403811c2ed5 Mon Sep 17 00:00:00 2001 From: Mees van der Wijk Date: Sun, 10 Aug 2025 16:09:44 +0200 Subject: [PATCH] Checking some stuff --- ModuleServerAPIGameLibGame.md | 60 ++++++++++++++++++++++ ModuleServerAPIGameLibScoreboardDetails.md | 24 +++++++++ _Sidebar.md | 3 +- 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 ModuleServerAPIGameLibScoreboardDetails.md diff --git a/ModuleServerAPIGameLibGame.md b/ModuleServerAPIGameLibGame.md index 9ba72ab..778e832 100644 --- a/ModuleServerAPIGameLibGame.md +++ b/ModuleServerAPIGameLibGame.md @@ -1,3 +1,63 @@ # ModuleClientApi - GameLib Game 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 diff --git a/ModuleServerAPIGameLibScoreboardDetails.md b/ModuleServerAPIGameLibScoreboardDetails.md new file mode 100644 index 0000000..108ff57 --- /dev/null +++ b/ModuleServerAPIGameLibScoreboardDetails.md @@ -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. | diff --git a/_Sidebar.md b/_Sidebar.md index bca5b16..d8a17cf 100644 --- a/_Sidebar.md +++ b/_Sidebar.md @@ -27,7 +27,8 @@ - [Game](./ModuleServerAPIGameLibGame) - [GamePlayer](./ModuleServerAPIGameLibGamePlayer) - [Scoreboard](./ModuleServerAPIGameLibScoreboard) - - [Scoreboard State](./ModuleServerAPIGameLibScoreboardState) + - [Details](./ModuleServerAPIGameLibScoreboardDetails) + - [State](./ModuleServerAPIGameLibScoreboardState) - [GameLib CollisionSpace](./ModuleServerAPIGameLibCollisionSpace) - [Libs](./ModuleServerAPILibs) - [LibWebSocket](./ModuleServerAPILibsWebSocketLib)