|
|
@@ -2,8 +2,16 @@
|
|
|
* Game Platform SDK
|
|
|
*
|
|
|
* window.GameSDK is injected by the platform before your bundle loads.
|
|
|
+ * Call it as a global — no import needed.
|
|
|
*
|
|
|
- * GameSDK.gameId — string, this game's id
|
|
|
- * GameSDK.getPlayerName() — string, current player's display name
|
|
|
- * GameSDK.submit(score) — Promise<{ ok: true, rank: number } | { ok: false, error: string }>
|
|
|
+ * const result = await GameSDK.submit(100)
|
|
|
+ * // { ok: true, rank: 3 }
|
|
|
+ *
|
|
|
+ * For TypeScript projects, copy game-sdk.d.ts into your source tree (or
|
|
|
+ * reference it in tsconfig) to get type checking and autocomplete.
|
|
|
+ *
|
|
|
+ * API:
|
|
|
+ * GameSDK.gameId — string
|
|
|
+ * GameSDK.getPlayerName() — string
|
|
|
+ * GameSDK.submit(score) — Promise<{ ok: true, rank } | { ok: false, error }>
|
|
|
*/
|