AVG.js
2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"use strict";
cc._RF.push(module, '07c7epTX2ZIYIs33/mYkM6q', 'AVG');
// script/avg/AVG.ts
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
}
Object.defineProperty(exports, "__esModule", { value: true });
exports.richNodeTextCount = exports.richNodesToCocosString = exports.ActionManager = exports.GameRecord = exports.PlotManager = exports.initAVG = void 0;
const simba_avg_core_1 = require("simba-avg-core");
Object.defineProperty(exports, "PlotManager", { enumerable: true, get: function () { return simba_avg_core_1.PlotManager; } });
const ActionManager_1 = require("simba-avg-core/dist/ActionManager");
Object.defineProperty(exports, "ActionManager", { enumerable: true, get: function () { return ActionManager_1.ActionManager; } });
const GameRecord_1 = require("simba-avg-core/dist/game-data/GameRecord");
const RichTextUtils_1 = require("simba-avg-core/dist/utils/RichTextUtils");
Object.defineProperty(exports, "richNodesToCocosString", { enumerable: true, get: function () { return RichTextUtils_1.richNodesToCocosString; } });
Object.defineProperty(exports, "richNodeTextCount", { enumerable: true, get: function () { return RichTextUtils_1.richNodeTextCount; } });
const simba_sdk_1 = require("simba-sdk");
const GameConfig_1 = require("../GameConfig");
const GameVariables_1 = require("./game-data/GameVariables");
async function retrieveRecord() {
return simba_sdk_1.SDK.getGameRecord();
}
async function saveRecord(record) {
simba_sdk_1.SDK.uploadGameRecord(record);
}
function initAVG() {
const USE_CDN_PLOTS = false;
return simba_avg_core_1.init(GameConfig_1.GameConfig.gameId, "", {
cdnUrl: USE_CDN_PLOTS ? GameConfig_1.GameConfig.cdnUrl : "", defaultGlobalVariables: GameVariables_1.defaultGlobalVariables, defaultRecordVariables: GameVariables_1.defaultRecordVariables,
globalVariableConstrains: GameVariables_1.globalVariableConstrains, recordVariableConstrains: GameVariables_1.recordVariableConstrains, retrieveRecord, saveRecord
});
}
exports.initAVG = initAVG;
let GameRecord = GameRecord_1.GameRecordBase;
exports.GameRecord = GameRecord;
__exportStar(require("simba-avg-core/dist/game-data/PlotsData"), exports);
__exportStar(require("simba-avg-core/dist/model/ActionModel"), exports);
__exportStar(require("simba-avg-core/dist/model/ConditionModel"), exports);
__exportStar(require("simba-avg-core/dist/model/PlotModel"), exports);
__exportStar(require("simba-avg-core/dist/model/RichTextModel"), exports);
cc._RF.pop();