cc.Class({
    extends: cc.Component,
    properties: {
        bgmusic: {
            default: null,
            type: cc.AudioSource
        },
    },
    onLoad () {
        cc.game.addPersistRootNode(this.node);
    },

    bgMusicPaly: function () {
         this.bgmusic.play();
         cc.log("paly");
    },

    bgMusicStop: function () {
        this.bgmusic.stop();
        cc.log("stop");
    }

});
