"use strict";
cc._RF.push(module, '280c3rsZJJKnZ9RqbALVwtK', 'HelloWorld');
// Script/HelloWorld.js

"use strict";

cc.Class({
    extends: cc.Component,

    properties: {
        label: {
            default: null,
            type: cc.Label
        },
        // defaults, set visually when attaching this script to the Canvas
        text: 'Hello, World!'
    },

    onLoad: function onLoad() {
        cc.loader.loadRes("music/bgm.mp3", cc.AudioClip, function (err, clip) {
            cc.audioEngine.play(clip, true, 1);
        }.bind(this));
    },
    onClick: function onClick() {
        cc.audioEngine.pauseAll();
        cc.audioEngine.resumeAll(); //下断点。第一次点击按钮会暂停音乐，放过断点音乐恢复。后续再次点击按钮，运行到此处，音乐则不会暂停。
    }
});

cc._RF.pop();