开发者

How to detect collision of two images? [duplicate]

开发者 https://www.devze.com 2023-03-01 13:48 出处:网络
This question already has answers here: Closed 11 years ago. Possible Duplicate: How to generate an end screen when two images collide?
This question already has answers here: Closed 11 years ago.

Possible Duplicate:

How to generate an end screen when two images collide?

how to generate an end screen when two images collide. I am ma开发者_运维问答king an app with a stickman you move with a very sensitive acceremeter. SO if it hits these spikes, (UIImages) it will generate the end screen. How do I make the app detect this collision and then generate an end screen.


if (CGRectIntersectsRect(imageView1.frame, imageView2.frame)) {
    // Do whatever it is you need to do.
}
0

精彩评论

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