是个简单的scene加载的问题,请大家帮忙看一下,我哪里写错了?
button点击后firefox的控制台里如下
undefined(未知)
loadScene: Unknown name type to load: "undefined"cocos2d-js-for-preview.js:21370:25
loadScene: Can not load the scene “undefined” because it was not in the build settings before playing.cocos2d-js-for-preview.js:21391:17
源码如下
cc.Class({
extends: cc.Component,
properties: {
tt:‘TwoPlay’,
},
// use this for initialization
onLoad: function () {
this.node.on('mousedown',function(){
cc.log(this.tt);
cc.director.loadScene(this.tt);
//cc.director.loadScene('TwoPlay');(使用这句是可以正确跳转到TwoPlay页面的)
})
},
});
