UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

25 lines (22 loc) 593 B
/** * Base class for implementing achievement system API connectors */ export class AchievementGateway { /** * Retrieve list of unlocked achievements * @returns {Promise<string[]>} IDs of unlocked achievements */ getUnlocked() { //needs to be overridden in subclass throw new Error('Not implemented'); } /** * Unlock an achievements by ID * @param {String} id * @returns {Promise} */ unlock(id) { //needs to be overridden in subclass throw new Error('Not implemented'); } }