跳转到内容

AchievementProvider

此内容尚不支持你的语言。

Defined in: services/achievements.ts:30

What a platform answers. The same shape as AdProvider and LeaderboardProvider: the engine orchestrates, the provider does the platform’s half, and the editor installs one to rehearse without a store.

readonly platformBacked: boolean

Defined in: services/achievements.ts:33

Whether a real store is behind this, rather than a local stand-in. Decides AchievementsAPI.available.

getStat(name): number

Defined in: services/achievements.ts:37

string

number


reset(): Promise<void>

Defined in: services/achievements.ts:43

Clear every achievement and stat. A development affordance — no shipped game calls it, and stores treat it as a test-only operation.

Promise<void>


setStat(name, value): void

Defined in: services/achievements.ts:36

string

number

void


store(): Promise<void>

Defined in: services/achievements.ts:40

Push everything set since the last call. Stores batch; a local provider has already persisted and answers immediately.

Promise<void>


unlock(id): Promise<void>

Defined in: services/achievements.ts:34

string

Promise<void>


unlocked(id): boolean

Defined in: services/achievements.ts:35

string

boolean