
                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/module/Config/GameConfig.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, 'c5692vnhwNF5J9nI7VNKQNW', 'GameConfig');
// Script/module/Config/GameConfig.ts

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.GameConfig = void 0;
var share_1 = require("../Share/share");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var GameConfig = /** @class */ (function () {
    function GameConfig() {
    }
    GameConfig_1 = GameConfig;
    Object.defineProperty(GameConfig, "Instance", {
        //游戏内信息
        get: function () {
            if (this._instance == null) {
                this._instance = new GameConfig_1();
            }
            return this._instance;
        },
        enumerable: false,
        configurable: true
    });
    //getSeedRandom
    GameConfig.init = function (Authentication) {
        this.CLICK_init();
        this.LEVEL_INFO_init();
        this.GM_INFO_init();
        var self = this;
        // cc.resources.load('Json/CLICK_DATA', (err: any, res: cc.JsonAsset) => {
        //     if (err) {
        //         return;
        //     }
        //     let jsonData: object = res.json!;
        //     self.CLICK_DATA = jsonData["data"];
        // })
        // cc.resources.load('Json/LEVEL_INFO', (err: any, res: cc.JsonAsset) => {
        //     if (err) {
        //         return;
        //     }
        //     let jsonData: object = res.json!;
        //     self.LEVEL_INFO = jsonData["data"];
        // })
        // cc.resources.load('Json/GM_INFO', (err: any, res: cc.JsonAsset) => {
        //     if (err) {
        //         if(!Authentication) self.Authentication();
        //         return;
        //     }
        //     let jsonData: object = res.json!;
        //     self.GM_INFO = jsonData["data"];
        //     cc.fx.GameTool.getCustom(false);
        //     if(!Authentication) self.Authentication();
        // })
        //GAME_DATA 废弃了，暂时不删除以防后面修改回 一整局传一次
        this.GAME_DATA = [];
        this.CUSTOM_INFO = [
            //第一难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第二难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第三难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第四难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第五难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第六难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第七难度          
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第八难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第九难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            },
            //第十难度
            {
                moveSpeed: 0,
                waitTime: 20,
                fastPath: 5 //最短路径
            }
        ];
        share_1.WeChat.setShare(location.href);
        if (!Authentication)
            self.Authentication();
    };
    //数据备用
    GameConfig.GM_INFO_init = function () {
        this.GM_INFO = {
            // isEnd: false,
            mean_Time: 0,
            total: 0,
            currSeed: 200000,
            gameId: "100012",
            userId: 0,
            guide: false,
            url: "https://api.sparkus.cn",
            success: false,
            matchId: null,
            custom: 0,
            round: 0,
            level: 0,
            stepTimeList: 0,
            successList: [],
            fen: 0,
            score: 0,
            igniteCount: 0,
            min_Steps: 0,
            min_Time: 0 //每一把上次距离洪峰到来时间
        };
    };
    GameConfig.GM_INFO_SET = function (key, value) {
        this.GM_INFO[key] = value;
    };
    GameConfig.CLICK_init = function () {
        this.CLICK_DATA =
            {
                type: 1,
                success: false,
                round: 0,
                getScore: 0,
                cumulativeScore: 0,
                mapId: "",
                difficulty: 0,
                optimizedSteps: 0,
                usedSteps: 0,
                stepList: [],
                startTime: -1,
                submitTime: -1,
                duration: 0,
                drawingBack: 0,
                drawingReset: 0,
                timer: 0,
            };
    };
    GameConfig.CLICK_SET = function (key, value) {
        this.CLICK_DATA[key] = value;
    };
    GameConfig.LEVEL_INFO_init = function () {
        this.TIME_INFO = {
            waterSpeed: [0.3, 0.25, 0.2, 0.18, 0.16, 0.14, 0.12, 0.1],
            totalTime: 20,
            waterTime: [10, 12, 14, 16, 18, 20, 20, 20],
            roadSpeed: 0.2,
            ReinforceSpeed: 0.2,
            Xi_SoilSpeed: 0.2,
        };
        this.LEVEL_INFO = [{ "id": "0001",
                "start": [['r'], ['b'], ['g']],
                "goal": [[], ['r', 'g'], ['b']],
                "middle": [[['b', 'r', 'g'], [], []], [['g'], ['b'], ['r']], [['r', 'b'], ['g'], []]],
                "steps": 17 //最大步数
            }];
        // 0  12 3
        // 312 0  0   2 3 1     13 2 0
    };
    GameConfig.Authentication = function () {
        cc.fx.GameTool.Authentication();
    };
    var GameConfig_1;
    //所有控制信息都通过GameAppStart内控制
    GameConfig._instance = null;
    GameConfig = GameConfig_1 = __decorate([
        ccclass('GameConfig')
    ], GameConfig);
    return GameConfig;
}());
exports.GameConfig = GameConfig;

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,[encoded data, 20796 characters]