Added more specs

2025-08-10 15:36:48 +02:00
parent 7f27d63784
commit af6f636d1c
6 changed files with 89 additions and 0 deletions

@@ -2,6 +2,36 @@
Class representing the GameLib inside the ModuleServerAPI. Class representing the GameLib inside the ModuleServerAPI.
## Rooms
### getRoom
Get a game room.
```javascript
api.GameLib.getRoom(roomId);
```
| Argument | Type | Description |
| -------- | ------ | ------------------- |
| roomId | string | The id of the room. |
**Return** [GameRoom](./ModuleServerAPIGameLibRoom) _GameRoom instance._
### hasRoom
Check if a game room exists.
```javascript
api.GameLib.hetRoom(roomId);
```
| Argument | Type | Description |
| -------- | ------ | ------------------- |
| roomId | string | The id of the room. |
**Return** boolean _Room exists._
## Collision ## Collision
### toSpace ### toSpace

@@ -0,0 +1,3 @@
# ModuleClientApi - GameLib Game
Class representing the GameLib Game inside the ModuleServerAPI.

@@ -0,0 +1,3 @@
# ModuleClientApi - GameLib GamePlayer
Class representing a Player of a GameLib Game inside the ModuleServerAPI.

@@ -0,0 +1,41 @@
# ModuleClientApi - GameLib Room
Class representing the GameLib Room inside the ModuleServerAPI.
## Methods
### newGame
Create a new game.
```javascript
room.newGame(gameDetails);
```
| Argument | Type | Description |
| ----------- | -------------------------------------------- | ------------------------ |
| gameDetails | [GameDetails](./ModuleApiGameLibGameDetails) | The details of the game. |
**Return** [Game](./ModuleServerAPIGameLibGame) _Game instance._
### clearQueue
Clear the queue.
```javascript
room.clearQueue();
```
## Events
### on: endScreen
Triggers when the endscreen should be shown.
```javascript
Controller.on('endScreen', (endScreen) => {});
```
| Argument | Type | Description |
| --------- | ------------------------------------------- | ------------------- |
| endScreen | [EndScreen](./ModuleAPIGameLibEndScreen.md) | The endscreen data. |

@@ -0,0 +1,3 @@
# ModuleClientApi - GameLib Scoreboard
Class representing a Scoreboard of a GameLib Game inside the ModuleServerAPI.

@@ -3,6 +3,7 @@
- [Setting up server](./ServerSetup) - [Setting up server](./ServerSetup)
- [Config](./Config) - [Config](./Config)
- Module Development - Module Development
- [Module Structure](./ModuleStructure) - [Module Structure](./ModuleStructure)
- [Module.json](./ModuleJSON) - [Module.json](./ModuleJSON)
- [Property](./ModuleJSONProperty) - [Property](./ModuleJSONProperty)
@@ -17,13 +18,20 @@
- [GameLib](./ModuleClientAPIGameLib) - [GameLib](./ModuleClientAPIGameLib)
- [Controller](./ModuleClientAPIGameLibController) - [Controller](./ModuleClientAPIGameLibController)
- [ModuleServerAPI](./ModuleServerAPI) - [ModuleServerAPI](./ModuleServerAPI)
- [Important Principals](./ModuleServerAPIPrincipals) - [Important Principals](./ModuleServerAPIPrincipals)
- [Client](./ModuleServerAPIClient) - [Client](./ModuleServerAPIClient)
- [Property](./ModuleServerAPIProperty) - [Property](./ModuleServerAPIProperty)
- [GameLib](./ModuleServerAPIGameLib) - [GameLib](./ModuleServerAPIGameLib)
- [Room](./ModuleServerAPIGameLibRoom)
- [Game](./ModuleServerAPIGameLibGame)
- [GamePlayer](./ModuleServerAPIGameLibGamePlayer)
- [Scoreboard](./ModuleServerAPIGameLibScoreboard)
- [GameLib CollisionSpace](./ModuleServerAPIGameLibCollisionSpace)
- [Libs](./ModuleServerAPILibs) - [Libs](./ModuleServerAPILibs)
- [LibWebSocket](./ModuleServerAPILibsWebSocketLib) - [LibWebSocket](./ModuleServerAPILibsWebSocketLib)
- [Axios](https://axios-http.com/docs/instance) - [Axios](https://axios-http.com/docs/instance)
- ModuleApi Shared - ModuleApi Shared
- [GameLib GameDetails](./ModuleApiGameLibGameDetails) - [GameLib GameDetails](./ModuleApiGameLibGameDetails)
- [GameLib EndScreen](./ModuleAPIGameLibEndScreen) - [GameLib EndScreen](./ModuleAPIGameLibEndScreen)
@@ -32,5 +40,6 @@
- [GameLib Ratio](./ModuleAPIGameLibRatio) - [GameLib Ratio](./ModuleAPIGameLibRatio)
- [Module Debugging](./ModuleDebugging) - [Module Debugging](./ModuleDebugging)
- [ModuleStore](./ModuleStore) - [ModuleStore](./ModuleStore)
- [Bug/Feature Reporting](./Reporting) - [Bug/Feature Reporting](./Reporting)
- [Contact Details](./ContactDetails) - [Contact Details](./ContactDetails)