10
votes

What is the difference between CCNode and CCLayer in Cocos2D?

1

1 Answers

1
votes

CCLayer is a CCNode with targeted+standard touch & accelerometer delegated .

CCLayer is inherited by CCNode .

this means it can use all the public properties which CCNode have rotation,scaleX,scaleY,position,visible.. etc .

with :

CCTargetedTouchDelegate. ccTouchBegan,ccTouchMoved,ccTouchEnded,ccTouchCancelled

CCStandardTouchDelegate ccTouchesBegan,ccTouchesMoved,ccTouchesEnded,ccTouchesCancelled

and UIAccelerometer accelerometer: