Hi,
It’s the first time I use cocos2dhtml5.
I create some games using cocos2d-x, now I want to port them to html5, but I’m confused with cocos2d-html5.
I just want to do a replaceScene in cocos2d-html5 like I do using C++, but I don’t know how to do.
Already look in the tests folder and I don’t understand how it works.
If someone can help, I’ll be very grateful.
var myNewScene = cc.Scene.create();
cc.Director.getInstance().replaceScene(myNewScene);
var myNewScene = cc.Scene.create();
cc.Director.getInstance().replaceScene(myNewScene);
But in the example above it don’t specify what scene do you want to call.
Using your example I create the following code:
cc.Director.getInstance().replaceScene(new OptionsScene());
This code works , but I’m worried if the allocate memory will be released.
It’s necessary to release the memory from the code above?