cc.Class({
    extends: cc.Component,

    properties: {
        AudioArr: { //音频
            type: cc.AudioClip,
            default: [],
        },
        ProgressBar: cc.Sprite,
    },

    // LIFE-CYCLE CALLBACKS:

    onLoad() {
        cc.audioEngine.playMusic(this.AudioArr[0]);
        this.startGame();
    },

    start() {

    },
    /**开始游戏 */
    startGame() {

        //let bundle = cc.assetManager.getBundle('01_graphics');
        this.ProgressBar.node.parent.active = true;
        //开始加载远程资源
        cc.loader.loadResDir('', cc.Asset, (completeCount, totalCount) => {
            this.ProgressBar.fillRange = completeCount / totalCount;
        }, () => {

            cc.director.loadScene('Game');
        });
    }
    // update (dt) {},
});