You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tobspr_shapez.io/src/js/platform/game_analytics.js

54 lines
979 B

/**
* @typedef {import("../application").Application} Application
*/
export class GameAnalyticsInterface {
constructor(app) {
/** @type {Application} */
this.app = app;
}
/**
* Initializes the analytics
* @returns {Promise<void>}
* @abstract
*/
initialize() {
abstract;
return Promise.reject();
}
/**
* Handles a new game which was started
*/
handleGameStarted() {}
/**
* Handles a resumed game
*/
handleGameResumed() {}
/**
* Handles the given level completed
* @param {number} level
*/
handleLevelCompleted(level) {}
/**
* Handles the given upgrade completed
* @param {string} id
* @param {number} level
*/
handleUpgradeUnlocked(id, level) {}
/**
* Activates a DLC
* @param {string} dlc
* @abstract
*/
activateDlc(dlc) {
abstract;
return Promise.resolve();
}
}