@musterbox/cocos) is a TypeScript binding for Cocos
Creator 3.8+. Package musterbox-cocos-1.0.0.tgz.
Install
Initialize
Authenticate and open a session
Events
Support matrix
Next: Defold.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Integrate the MusterBox SDK with Cocos Creator 3.8+.
@musterbox/cocos) is a TypeScript binding for Cocos
Creator 3.8+. Package musterbox-cocos-1.0.0.tgz.
# dist/cocos/musterbox-cocos-1.0.0.tgz
# Extension Manager > Add dependency from file (or add to package.json)
npm install ./musterbox-cocos-1.0.0.tgz
import { MusterBox } from "@musterbox/cocos";
const box = new MusterBox();
box.initialize({
gameId: "my-arena-game",
gameKey: "gk_...",
environment: "sandbox",
});
box.start();
box.authenticate({ identifier: "player@example.com", password: "secret" });
const ctx = box.openSession("sandbox", 1042);
// ctx.sessionId, ctx.token, ctx.context { tournamentId, matchId, participantId, slot }
box.submitEvent("match.start", { mode: "arena" });
box.on("session", (evt) => { /* session lifecycle events */ });
box.on("wallet", (evt) => { /* wallet updates */ });
box.on("status", (evt) => { /* status transitions */ });
| Cocos Creator | SDK | Package |
|---|---|---|
| 3.8+ | 1.0.0 | @musterbox/cocos |
