Layer, scene, and sprite all have 0.5, 0.5 by default.
All of the three are inherited from the node, so there is no difference at the moment, or the following is true.
In the cocos2d-x, one application can have multiple scene, but only one is acitve at any time.
A ccscene consists of multiple ccnodes. Generally, it contains several cclayers, and cclayers contain multiple ccsprite.
It should be noted that ccscene, cclayer, and ccsprite all inherit ccnode, except that the latter has other parent classes which are implemented using multi-inheritance.
It is known that the visual data organization of the cocos2d-x is a scene tree, but some of the intermediate nodes are given additional logic (such as ccscene and cclayer)
Auto visiblesize = Director: getinstance ()->Getvisiblesize (); Sprite* SPR = sprite: Create ("Bang.png"); SPR->Setposition (vec2 (visiblesize. Width, visiblesize. Height); scene-> Addchild (SPR );
The _ eventdispatcher In the director class of node indicates that _ eventdispatcher is a singleton,
{// Node class constructor // set default scheduler and actionmanager Director * Director = Director: getinstance (); _ actionmanager = Director-> getactionmanager (); _ actionmanager-> retain (); _ schedctor = Director-> getscheduler (); _ scheduler-> retain (); _ eventdispatcher = Director-> geteventdispatcher (); _ eventdispatcher-> retain ();}