Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between CCNode and CCLayer?

What is the difference between CCNode and CCLayer in Cocos2D?

like image 690
senthilM Avatar asked Feb 01 '11 09:02

senthilM


1 Answers

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:

like image 126
rahul_send89 Avatar answered Oct 12 '22 00:10

rahul_send89