Can anyone think why this isn't working? It's really simple but doesn't seem to work. The key is supposed to disappear when it touches the character which is animated by a simple UIView animation and it's called by:
Code:
[UIView setAnimationDidStopSelector:@selector(FinishedWalking)];
The problem is it seems to disappear almost randomly after you walk, even if you haven't collided with it. Heres the collision code:
Code:
-(void)FinishedWalking{
if(CGRectIntersectsRect(Key.frame, Character.frame)){
Key.hidden = YES;
KeyObtained = YES;
}
}
The key and Character and both inside the same UIView. Any help would be greatly appreciated.
Cheers,
Ozzie