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.
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ [Home](./index.md) &gt; [server](./server.md) &gt; [ColliderOptions](./server.collideroptions.md) &gt; [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 > 1) {
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 <= 1) {
273
+ if (GAME_PLAYER_ENTITIES.size <= 0) {
274
274
  endGame();
275
275
  }
276
276
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.",
5
5
  "main": "server.js",
6
6
  "bin": {
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. */