Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between ccTouchesCancelled and ccTouchesEnded event in Cocos2d?

I'm wonderring that what's the difference between ccTouchesCancelled and ccTouchesEnded events in Cocos2d?

Thanks!
Tien

like image 670
Tien Nguyen Avatar asked Jan 20 '23 09:01

Tien Nguyen


1 Answers

Any Touches Cancelled on the iPhone refers a situation where the user was touching a element, and then was interrupted by an unexpected (on your part) notification such as a text-message, low battery warning, or phone call. In that situation they were touching the element but were interrupted in the middle. You should handle it by understanding where ever the user was last touching the screen might not have been where he intended to stop touching (touch up).

Touches Ended means the user intentionally stopped touching the element.

like image 75
Ajay Avatar answered Mar 08 '23 22:03

Ajay