c++ - cocos2d-x CSLoader how to load selected nodes only -
i'm searching docs on cocos2dx website , on google couldn't find any. problem is, when load csb file cocostudio, loads nodes , resources etc... makes texture memory high. know if there method or solution loading selected nodes scene file of cocostudio.
thanks!
i had same kind of problem, , stems trying make 1 scene contain need. decided split components layers, loaded own components when needed.
as example. in main scene have inventory tray, building area , custom buttons panel. split of these separate layers. inventorytray.csb, buildingarea.csb, buttonpanel.csb , have them seperate in code well, 1 object load each of layouts. overall code lot more maintainable since each class has few lines of code in it.
this way can load inventory tray up, , not load buttons panel until user "needs" interact it. same goes fancy pause menu's might include animations , assets may take more texture memory. create separate layer , load when need to.
i hope helps, never found cocostudio scenes useful, other menu system, since each of menu scenes i've built (so far) has been self-contained.
Comments
Post a Comment