Sunday 15 August 2010

ios - Making a UIImageView stop moving when collision is detected -



ios - Making a UIImageView stop moving when collision is detected -

i have turret , bullet, hooked properties of weak , nonamatic. have big horizontal line leading downwards view controller.

is there way single button press create turret "shoot" bullet, having bullet's y position continuously increase? here's catch, must stop after colliding line.

note: i've tried [uiview animatewithduration] collision detected before collision takes place.

in app created, observe collisions used this:

if (cgrectintersectsrect(bullet.frame, line.frame)) { [self gameover]; }

saying if bullet comes contact part of line, phone call on method end game.

ios objective-c uiimageview collision-detection

No comments:

Post a Comment