mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-07-18 12:10:18 +08:00
Progress: Documentation
This commit is contained in:
@@ -107,6 +107,8 @@ Type: string
|
||||
**options**
|
||||
Type: object literal
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.addInput(input)
|
||||
```
|
||||
@@ -114,6 +116,8 @@ GarageServerIO.addInput(input)
|
||||
**input**
|
||||
Type: object literal
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.getStates(callback([, playerState], [, entityState]))
|
||||
```
|
||||
@@ -127,6 +131,8 @@ Type: array of object literals
|
||||
**entityStates**
|
||||
Type: array of object literals
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.getId() : playerid
|
||||
```
|
||||
@@ -134,6 +140,8 @@ GarageServerIO.getId() : playerid
|
||||
**playerid**
|
||||
Type: number
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.sendServerEvent(data)
|
||||
```
|
||||
@@ -166,14 +174,26 @@ options = {
|
||||
*/
|
||||
```
|
||||
|
||||
**io**
|
||||
Type: Socket.IO instance
|
||||
|
||||
**options**
|
||||
Type: object literal
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.start()
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.stop()
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.getPlayers() : [,{ id, state, [,inputs], [,{ states, executionTimes }] }]
|
||||
```
|
||||
@@ -190,6 +210,8 @@ Type: array of object literals
|
||||
**states**
|
||||
Type: array of object literals
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.getEntities() : [,{ id, state, [,{ state, executionTime }] }]
|
||||
```
|
||||
@@ -203,6 +225,8 @@ Type: object literal
|
||||
**states**
|
||||
Type: array of object literals
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.updatePlayerState(id, state)
|
||||
```
|
||||
@@ -212,6 +236,8 @@ Type: string
|
||||
**state**
|
||||
Type: object literal
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.updateEntityState(id, state)
|
||||
```
|
||||
@@ -221,18 +247,24 @@ Type: string
|
||||
**state**
|
||||
Type: object literal
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.addEntity(id)
|
||||
```
|
||||
**id**
|
||||
Type: string
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.removeEntity(id)
|
||||
```
|
||||
**id**
|
||||
Type: string
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.sendPlayerEvent(id, data)
|
||||
```
|
||||
@@ -242,6 +274,8 @@ Type: string
|
||||
**data**
|
||||
Type: object literal
|
||||
|
||||
---
|
||||
|
||||
```js
|
||||
GarageServerIO.sendPlayersEvent(data)
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user