Are all CCNodes TargetedTouchdelegates?

Are all CCNodes TargetedTouchdelegates?
0.0 0


I am trying to implement the BobUeland Tutorail on 3 missiles cf :
and among other things he defines sprites as:
@interface Missile : CCNode {”
to then receive the touch events.
So far in the tutorial on cocos2dx, I could see this kind of declaration rather a “virtual ccTouchBegan” in the class definition (e.g. test/test/controller.h)
does this mean that potential all CCNodes of cocos2d are touch delegates?


No, it means Missile inherits from CCNode, and implements CCTargetedTouchDelegate.


what ob-c in Bob example does is clear, what cocos2d-x is less clear why in tutorial 4 (how to fire some bullet) :
" Declare the callback function “void ccTouchesEnded(cocos2d::CCSet* touches, cocos2d::CCEvent* event);” in HelloWorldScene.h, and realize the function in HelloWorldScene.cpp."
why not in Helloworld.h of helloworld project? (hence my question are all CCNODE of cocos2d-x touchetargeted delegates or not?
( by the why not virtual void cctouchesEnded? since cctouchesEnded is inherited?)