// Learn TypeScript:
//  - https://docs.cocos.com/creator/manual/en/scripting/typescript.html
// Learn Attribute:
//  - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html
// Learn life-cycle callbacks:
//  - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html

const { ccclass, property } = cc._decorator;

@ccclass
export default class Main extends cc.Component {

    // LIFE-CYCLE CALLBACKS:

    onLoad() {

    }

    start() {
        // console.log("运行LoadScene场景")
        cc.assetManager.loadBundle('shop', (err, bundle) => {
            if (err) {
                console.error('加载 shop 失败:', err);
            } else {
                // console.log('shop加载成功');
                cc.director.loadScene("LoadScene", (loadErr) => {
                    if (loadErr) {
                        // 加载场景失败，打印错误信息
                        console.error('加载 LoadScene 场景失败:', loadErr);
                    }
                });
            }
        });
        // 预加载 LoadScene 场景
        // console.log("开始加载LoadScene场景")


    }




    // update (dt) {}
}
