"use strict";
cc._RF.push(module, '454adgphRpA6oq5lB6Cg1fK', 'Load');
// Script/Load.ts

"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
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 });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property, requireComponent = _a.requireComponent;
var NewClass = /** @class */ (function (_super) {
    __extends(NewClass, _super);
    function NewClass() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    NewClass.prototype.start = function () {
        window.initMgr();
        // WeChat.setShare(location.href);
        cc.fx.GameConfig.init();
        // cc.fx.AudioManager._instance.init();
        var urlNow = window.location.href;
        if (this.containsTrain(urlNow)) {
            console.log("无排行版本");
            this.node.getChildByName("Rank").active = false;
        }
        else {
            console.log("有排行版本");
        }
    };
    //判断来源
    NewClass.prototype.containsTrain = function (str) {
        return /from=train/i.test(str);
    };
    //开始游戏，跳转至引导页面
    NewClass.prototype.startGame = function () {
        cc.director.loadScene("GuideScene");
    };
    //备用，用来测试跳转 指定关卡
    NewClass.prototype.clickBtn = function (event, data) {
        cc.fx.GameConfig.GM_INFO.custom = parseInt(data);
        cc.director.loadScene("GameScene");
    };
    //打开排行榜
    NewClass.prototype.openRank = function () {
        cc.director.loadScene("RankScene");
    };
    NewClass.prototype.update = function (dt) {
    };
    NewClass = __decorate([
        ccclass
    ], NewClass);
    return NewClass;
}(cc.Component));
exports.default = NewClass;

cc._RF.pop();