开发者

IPhone SDK: detect which touch came first on a 2 touch max application

Coding inside the function -(void) ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event receivin开发者_如何学编程g 2 touches in the "event" variable, how can one detect which touch has lived longer? i know i could use global variables and in the touchbegin just update these variables, but I rather do it the better way, if there is any.


How about comparing the UITouch timestamp properties?


Eventually I stored pointers to the touches. saving a timestamp manually, found no other way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜