1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2024-10-27 20:34:29 +00:00
tobspr_shapez.io/src/js/platform/game_analytics.js

52 lines
945 B
JavaScript
Raw Normal View History

2020-08-06 09:28:28 +00:00
/**
* @typedef {import("../application").Application} Application
*/
2020-05-09 14:45:23 +00:00
export class GameAnalyticsInterface {
constructor(app) {
/** @type {Application} */
this.app = app;
}
/**
* Initializes the analytics
* @returns {Promise<void>}
*/
initialize() {
abstract;
return Promise.reject();
}
2020-05-12 18:06:50 +00:00
/**
* Handles a new game which was started
*/
handleGameStarted() {}
2020-05-09 14:45:23 +00:00
/**
2020-06-24 15:59:43 +00:00
* Handles a resumed game
2020-05-09 14:45:23 +00:00
*/
2020-06-24 15:59:43 +00:00
handleGameResumed() {}
2020-05-09 14:45:23 +00:00
/**
* 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
*/
activateDlc(dlc) {
abstract;
return Promise.resolve();
}
2020-05-09 14:45:23 +00:00
}