hytopia 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/server.collideroptions.flags.md +13 -0
- package/docs/server.collideroptions.md +19 -0
- package/examples/hole-in-wall-game/index.ts +2 -2
- package/package.json +1 -1
- package/server.api.json +27 -0
- package/server.d.ts +2 -0
- package/server.js +81 -81
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [ColliderOptions](./server.collideroptions.md) > [flags](./server.collideroptions.flags.md)
|
4
|
+
|
5
|
+
## ColliderOptions.flags property
|
6
|
+
|
7
|
+
The flags of the collider if the shape is a trimesh
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
flags?: number;
|
13
|
+
```
|
@@ -129,6 +129,25 @@ boolean
|
|
129
129
|
_(Optional)_ Whether the collider is enabled.
|
130
130
|
|
131
131
|
|
132
|
+
</td></tr>
|
133
|
+
<tr><td>
|
134
|
+
|
135
|
+
[flags?](./server.collideroptions.flags.md)
|
136
|
+
|
137
|
+
|
138
|
+
</td><td>
|
139
|
+
|
140
|
+
|
141
|
+
</td><td>
|
142
|
+
|
143
|
+
number
|
144
|
+
|
145
|
+
|
146
|
+
</td><td>
|
147
|
+
|
148
|
+
_(Optional)_ The flags of the collider if the shape is a trimesh
|
149
|
+
|
150
|
+
|
132
151
|
</td></tr>
|
133
152
|
<tr><td>
|
134
153
|
|
@@ -167,7 +167,7 @@ function addPlayerEntityToQueue(world: World, playerEntity: PlayerEntity) {
|
|
167
167
|
world.chatManager.sendPlayerMessage(playerEntity.player, 'You have joined the next game queue!', '00FF00');
|
168
168
|
uiUpdate({ queueCount: QUEUED_PLAYER_ENTITIES.size });
|
169
169
|
|
170
|
-
if (gameState === 'awaitingPlayers' && QUEUED_PLAYER_ENTITIES.size >
|
170
|
+
if (gameState === 'awaitingPlayers' && QUEUED_PLAYER_ENTITIES.size > 0) {
|
171
171
|
queueGame(world);
|
172
172
|
}
|
173
173
|
|
@@ -270,7 +270,7 @@ function killPlayer(playerEntity: PlayerEntity) {
|
|
270
270
|
playerEntity.setPosition(GAME_CONFIG.POSITIONS.PLAYER_SPAWN);
|
271
271
|
GAME_PLAYER_ENTITIES.delete(playerEntity);
|
272
272
|
|
273
|
-
if (GAME_PLAYER_ENTITIES.size <=
|
273
|
+
if (GAME_PLAYER_ENTITIES.size <= 0) {
|
274
274
|
endGame();
|
275
275
|
}
|
276
276
|
|
package/package.json
CHANGED
package/server.api.json
CHANGED
@@ -8033,6 +8033,33 @@
|
|
8033
8033
|
"endIndex": 2
|
8034
8034
|
}
|
8035
8035
|
},
|
8036
|
+
{
|
8037
|
+
"kind": "PropertySignature",
|
8038
|
+
"canonicalReference": "server!ColliderOptions#flags:member",
|
8039
|
+
"docComment": "/**\n * The flags of the collider if the shape is a trimesh\n */\n",
|
8040
|
+
"excerptTokens": [
|
8041
|
+
{
|
8042
|
+
"kind": "Content",
|
8043
|
+
"text": "flags?: "
|
8044
|
+
},
|
8045
|
+
{
|
8046
|
+
"kind": "Content",
|
8047
|
+
"text": "number"
|
8048
|
+
},
|
8049
|
+
{
|
8050
|
+
"kind": "Content",
|
8051
|
+
"text": ";"
|
8052
|
+
}
|
8053
|
+
],
|
8054
|
+
"isReadonly": false,
|
8055
|
+
"isOptional": true,
|
8056
|
+
"releaseTag": "Public",
|
8057
|
+
"name": "flags",
|
8058
|
+
"propertyTypeTokenRange": {
|
8059
|
+
"startIndex": 1,
|
8060
|
+
"endIndex": 2
|
8061
|
+
}
|
8062
|
+
},
|
8036
8063
|
{
|
8037
8064
|
"kind": "PropertySignature",
|
8038
8065
|
"canonicalReference": "server!ColliderOptions#friction:member",
|
package/server.d.ts
CHANGED
@@ -1054,6 +1054,8 @@ export declare interface ColliderOptions {
|
|
1054
1054
|
collisionGroups?: CollisionGroups;
|
1055
1055
|
/** Whether the collider is enabled. */
|
1056
1056
|
enabled?: boolean;
|
1057
|
+
/** The flags of the collider if the shape is a trimesh */
|
1058
|
+
flags?: number;
|
1057
1059
|
/** The friction of the collider. */
|
1058
1060
|
friction?: number;
|
1059
1061
|
/** The friction combine rule of the collider. */
|