onCollisionEnter: function (other, self) {
console.log('@@@on collision enter');
this.a = 10;
cc.game.addPersistRootNode(this.node);//当前节点不可销毁
cc.director.loadScene("空白");//切换场景
},
onCollisionEnter: function (other, self) {
console.log('@@@on collision enter');
this.a = 10;
cc.game.addPersistRootNode(this.node);//当前节点不可销毁
cc.director.loadScene("空白");//切换场景
},
本文标题:切换场景和常驻节点
本文链接:https://www.haomeiwen.com/subject/ohsdyqtx.html
网友评论