Hi
I want to play small translation animation while switching from scene1 to scene2.I have used cc.game.addPersistRootNode(this.transitNode) to store scene1 node , but while switching to scene2 my scene2 got scaled down . please take a look in code
cc.Class({
extends: cc.Component,
properties: {
label: {
default: null,
type: cc.Label
},
// defaults, set visually when attaching this script to the Canvas
text: 'Hello, World!'
},
// use this for initialization
onLoad: function () {
this.label.string = this.text;
var self = this;
this.transitNode = this.node;
cc.game.addPersistRootNode(this.transitNode);
this.node.on(cc.Node.EventType.TOUCH_END, function(event){
cc.director.loadScene("scene2",function(err, data){
//self.transitNode.removeFromParent();
cc.game.removePersistRootNode(self.transitNode);
//delete(self.transitNode);
cc.log(self)
});
});
},
});