star-sdk-cli 0.1.23 → 0.1.24
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/dist/cli.mjs +4 -2
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -84,8 +84,8 @@ Star.game(g => {
|
|
|
84
84
|
Use \`g.tap\` in the loop with if/else for priority \u2014 check buttons first, then general tap:
|
|
85
85
|
|
|
86
86
|
\`\`\`javascript
|
|
87
|
-
const lbBtn = { x:
|
|
88
|
-
const restartBtn = { x:
|
|
87
|
+
const lbBtn = { x: width / 2 - 120, y: height / 2 + 20, w: 240, h: 50 };
|
|
88
|
+
const restartBtn = { x: width / 2 - 120, y: height / 2 + 90, w: 240, h: 50 };
|
|
89
89
|
|
|
90
90
|
function inRect(tap, r) {
|
|
91
91
|
return tap.x >= r.x && tap.x <= r.x + r.w && tap.y >= r.y && tap.y <= r.y + r.h;
|
|
@@ -1420,6 +1420,8 @@ leaderboard.submit(reactionTimeMs);
|
|
|
1420
1420
|
|
|
1421
1421
|
4. **Don't store leaderboard state** - Just call the SDK methods when needed. The SDK handles caching.
|
|
1422
1422
|
|
|
1423
|
+
6. **\`show()\` is safe to call repeatedly** - It handles open/close state internally. Do not add your own \`shown\` flag; it will prevent the player from reopening the leaderboard.
|
|
1424
|
+
|
|
1423
1425
|
5. **Works for guests** - Guests get an auto-generated name like "Guest1234". Pass \`{ playerName }\` to let players choose their own name.`;
|
|
1424
1426
|
|
|
1425
1427
|
// src/cli.ts
|