GameDotMgr.js 4.05 KB

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/script/game/GameDotMgr.js';
                    var __require = nodeEnv ? function (request) {
                        return cc.require(request);
                    } : function (request) {
                        return __quick_compile_project__.require(request, __filename);
                    };
                    function __define (exports, require, module) {
                        if (!nodeEnv) {__quick_compile_project__.registerModule(__filename, module);}"use strict";
cc._RF.push(module, '42c85SZlkZBiK4oiwPhmvGG', 'GameDotMgr');
// script/game/GameDotMgr.ts

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const AVG_1 = require("../avg/AVG");
const GameModelManager_1 = require("./model/GameModelManager");
let GameDotMgr = /** @class */ (() => {
    class GameDotMgr {
        static getInstance() {
            return GameDotMgr._instance;
        }
        async dotClickUI(uiName) {
            let recordKey = "click_ui_count_" + uiName + "_t_" + GameModelManager_1.GameModelManager.getCurDayStr();
            let clickCount = AVG_1.GameRecord.globalVariables[recordKey];
            if (undefined === clickCount) {
                clickCount = 0;
            }
            clickCount += 1;
            AVG_1.GameRecord.globalVariables[recordKey] = clickCount;
            AVG_1.GameRecord.saveRecord();
        }
    }
    GameDotMgr._instance = new GameDotMgr();
    return GameDotMgr;
})();
exports.default = GameDotMgr;

cc._RF.pop();
                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0cy9zY3JpcHQvZ2FtZS9HYW1lRG90TWdyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0Esb0NBQXdDO0FBQ3hDLCtEQUE0RDtBQUU1RDtJQUFBLE1BQXFCLFVBQVU7UUFHcEIsT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