webmobile能不能在载入时指定载入场景

逢二进一
Thu, 06 Jul 2017 01:59:39 +0000

谢谢，我找到代码

if (cc.runtime) {
cc.director.setRuntimeLaunchScene(launchScene);
}

        cc.director.loadScene(launchScene, null,
            function () {
                if (cc.sys.isBrowser) {
                    // show canvas
                    canvas.style.visibility = '';
                    var div = document.getElementById('GameDiv');
                    if (div) {
                        div.style.backgroundImage = '';
                    }
                }
                cc.loader.onProgress = null;

                // play game
                // cc.game.resume();

                console.log('Success to load scene: ' + launchScene);
            }
        );

有个疑问，cc.director.setRuntimeLaunchScene(launchScene);这一句是起什么作用？setRuntimeLaunchScene有对应的接口说明吗？

阅读整个主题