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

                    }
                    if (nodeEnv) {
                        __define(__module.exports, __require, __module);
                    }
                    else {
                        __quick_compile_project__.registerModuleFunc(__filename, function () {
                            __define(__module.exports, __require, __module);
                        });
                    }
                })();
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/Helloworld.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, 'e1b90/rohdEk4SdmmEZANaD', 'Helloworld');
// Script/Helloworld.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 (b.hasOwnProperty(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 AudioM_1 = require("./AudioM");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Helloworld = /** @class */ (function (_super) {
    __extends(Helloworld, _super);
    function Helloworld() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'hello';
        return _this;
    }
    Helloworld.prototype.start = function () {
        // init logic
        cc.audioEngine.setMusicVolume(1);
        this.label.string = this.text;
        if (AudioM_1.default.getIns().canPlayMusic) {
            AudioM_1.default.getIns().playMusic('bg_1');
        }
        this.playAudio();
    };
    Helloworld.prototype.playAudio = function () {
        for (var i = 0; i < 5; i++) {
            var ran = Math.floor(Math.random() * 5);
            var str = '';
            if (ran != 0)
                str = String(ran);
            AudioM_1.default.getIns().playClick(str);
            AudioM_1.default.getIns().playClose(str);
        }
    };
    Helloworld.prototype.inGame = function () {
        cc.director.loadScene('game');
    };
    Helloworld.prototype.restart = function () {
        cc.game.restart();
    };
    Helloworld.prototype.c_music = function () {
        AudioM_1.default.getIns().canPlayMusic = !AudioM_1.default.getIns().canPlayMusic;
        if (AudioM_1.default.getIns().canPlayMusic) {
            cc.audioEngine.resumeMusic();
        }
        else {
            cc.audioEngine.pauseMusic();
        }
    };
    __decorate([
        property(cc.Label)
    ], Helloworld.prototype, "label", void 0);
    __decorate([
        property
    ], Helloworld.prototype, "text", void 0);
    Helloworld = __decorate([
        ccclass
    ], Helloworld);
    return Helloworld;
}(cc.Component));
exports.default = Helloworld;

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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ygpLnBsYXlDbGljayhzdHIpO1xyXG4gICAgICAgICAgICBBdWRpb00uZ2V0SW5zKCkucGxheUNsb3NlKHN0cik7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIGluR2FtZSgpIHtcclxuICAgICAgICBjYy5kaXJlY3Rvci5sb2FkU2NlbmUoJ2dhbWUnKTtcclxuICAgIH1cclxuXHJcbiAgICByZXN0YXJ0KCkge1xyXG4gICAgICAgIGNjLmdhbWUucmVzdGFydCgpO1xyXG4gICAgfVxyXG5cclxuICAgIGNfbXVzaWMoKSB7XHJcbiAgICAgICAgQXVkaW9NLmdldElucygpLmNhblBsYXlNdXNpYyA9ICFBdWRpb00uZ2V0SW5zKCkuY2FuUGxheU11c2ljO1xyXG4gICAgICAgIGlmIChBdWRpb00uZ2V0SW5zKCkuY2FuUGxheU11c2ljKSB7XHJcbiAgICAgICAgICAgIGNjLmF1ZGlvRW5naW5lLnJlc3VtZU11c2ljKCk7XHJcbiAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgY2MuYXVkaW9FbmdpbmUucGF1c2VNdXNpYygpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG4iXX0=
//------QC-SOURCE-SPLIT------

                (function() {
                    var nodeEnv = typeof require !== 'undefined' && typeof process !== 'undefined';
                    var __module = nodeEnv ? module : {exports:{}};
                    var __filename = 'preview-scripts/assets/Script/game.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, '190eabTY1VFvaCFdHk3UMk9', 'game');
// Script/game.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 (b.hasOwnProperty(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 AudioM_1 = require("./AudioM");
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var game = /** @class */ (function (_super) {
    __extends(game, _super);
    function game() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.label = null;
        _this.text = 'game scene';
        return _this;
    }
    game.prototype.start = function () {
        // init logic
        this.label.string = this.text;
        if (AudioM_1.default.getIns().canPlayMusic) {
            AudioM_1.default.getIns().playMusic('bg_2');
        }
        this.playAudio();
    };
    game.prototype.playAudio = function () {
        for (var i = 0; i < 5; i++) {
            AudioM_1.default.getIns().playClick();
            AudioM_1.default.getIns().playClose();
        }
    };
    game.prototype.outGame = function () {
        cc.director.loadScene('helloworld');
    };
    __decorate([
        property(cc.Label)
    ], game.prototype, "label", void 0);
    __decorate([
        property
    ], game.prototype, "text", void 0);
    game = __decorate([
        ccclass
    ], game);
    return game;
}(cc.Component));
exports.default = game;

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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFz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AgQXVkaW9NLmdldElucygpLnBsYXlDbGljaygpO1xyXG4gICAgICAgICAgICBBdWRpb00uZ2V0SW5zKCkucGxheUNsb3NlKCk7XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIG91dEdhbWUoKSB7XHJcbiAgICAgICAgY2MuZGlyZWN0b3IubG9hZFNjZW5lKCdoZWxsb3dvcmxkJyk7XHJcbiAgICB9XHJcbn1cclxuIl19
//------QC-SOURCE-SPLIT------

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

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var AudioM = /** @class */ (function () {
    function AudioM() {
        this.canPlayMusic = true;
    }
    ;
    AudioM.getIns = function () {
        if (!this._instance) {
            this._instance = new AudioM();
        }
        return this._instance;
    };
    AudioM.prototype.playClose = function (str) {
        var _this = this;
        if (str === void 0) { str = ''; }
        this.loadAudioRes('common_close' + str).then(function (clip) {
            if (!_this.playingEffect)
                _this.playingEffect = {};
            _this.playingEffect[clip.name] = { time: new Date().getTime() };
            var audioID = cc.audioEngine.playEffect(clip, false);
            var self = _this;
            cc.audioEngine.setFinishCallback(audioID, function (data) {
                if (self.playingEffect[clip.name])
                    delete self.playingEffect[clip.name];
                cc.audioEngine.setFinishCallback(audioID, null);
            });
        });
    };
    AudioM.prototype.playClick = function (str) {
        var _this = this;
        if (str === void 0) { str = ''; }
        this.loadAudioRes('common_click' + str).then(function (clip) {
            if (!_this.playingEffect)
                _this.playingEffect = {};
            _this.playingEffect[clip.name] = { time: new Date().getTime() };
            var audioID = cc.audioEngine.playEffect(clip, false);
            var self = _this;
            cc.audioEngine.setFinishCallback(audioID, function (data) {
                if (self.playingEffect[clip.name])
                    delete self.playingEffect[clip.name];
                cc.audioEngine.setFinishCallback(audioID, null);
            });
        });
    };
    AudioM.prototype.playMusic = function (name) {
        this.loadAudioRes(name).then(function (clip) {
            cc.audioEngine.playMusic(clip, true);
        });
    };
    AudioM.prototype.loadAudioRes = function (audioUrl) {
        return new Promise(function (resolve, reject) {
            cc.resources.load(audioUrl, cc.AudioClip, function (err, data) {
                if (err && !data)
                    return cc.warn('loading loadRes error-> ' + audioUrl);
                resolve(data);
            });
        });
    };
    return AudioM;
}());
exports.default = AudioM;

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, 
//------QC-SOURCE-SPLIT------
