About CCTouchDelegate question!

About CCTouchDelegate question!
0.0 0

#1

I see the class CCTouchDelegate. there are “ccTouchBegan”, “ccTouchMoved”, “ccTouchEnded”, and “ccTouchCancelled”, and why “ccTouchBegan” return bool, others return void? and when call
“ccTouchCancelled” ?
where is the article about cocos2d CCTouchDelegate?
thanks!


#2

There are two types of touch delegate, target and standard. Target delegate can swallow the touch event if ccTouchBegan return true. Standard delegate can not swallow the touch event.

For detail implementation, you can refer CCTouchDispatcher::touches().


#3

Here’s the document on cocos2d-iphone.org website
http://www.cocos2d-iphone.org/wiki/doku.php/tips:touchdelegates?s[]=touch&s[]=delegate


#4

thanks!