/** CCNode is the main element. Anything thats gets drawn or contains things that get drawn is a CCNode.
The most popular CCNodes are: CCScene, CCLayer, CCSprite, CCMenu.
The main features of a CCNode are:
- They can contain other CCnode nodes (addChild, getChildByTag, removeChild, etc)
- They can schedule periodic callback (schedule, unschedule, etc)
- They can execute actions (runAction, stopAction, etc)
Some CCNode nodes provide extra functionality for them or their children.
Subclassing a CCNode usually means (one/all) of:
- overriding init to initialize resources and schedule callbacks
- create callbacks to handle the advancement of time
- overriding draw to render the node
Features of CCNode:
- position
- scale (x, y)
- rotation (in degrees)
- Camera ( using spherical coordinates )
- GridBase (to do mesh transformations)
- anchor point
- size
- visible
- z-order
- openGL z position
Default values:
- rotation: 0
- position: (x=0,y=0)
- scale: (x=1,y=1)
- contentSize: (x=0,y=0)
- anchorPoint: (x=0,y=0)
Limitations:
- A CCNode is a "void" object. It doesn't have a texture
Order in transformations with grid disabled
- 1) The node will be translated (position)
- 2) The node will be rotated (rotation)
- 3) The node will be scaled (scale)
- 4) The node will be moved according to the camera values (camera)
Order in transformations with grid enabled
- 1) The node will be translated (position)
- 2) The node will be rotated (rotation)
- 3) The node will be scaled (scale)
- 4) The grid will capture the screen
- 5) The node will be moved according to the camera values (camera)
- 6) The grid will render the captured screen
Camera:
- Each node has a camera. By default it points to the center of the CCNode.
*/








덧글