Hello, vetji,
You want add enemy on your "papijump" game ?
you do as platforms, you created a macro kStatsGameOver and you write that :
if (CGRectIntersectsRect(ball.frame, malus.frame))
{
if (ball.center.y + 8 < malus.center.y)
{
if (ballVelocity.y > 0) {
ballVelocity.y = -kStateGameOver;
GameOverCompletedTilt *controller = [[GameOverCompletedTilt alloc] initWithNibName:@"GameOverCompletedTilt" bundle:nil];
[self presentModalViewController:controller animated:NO];
[controller release];
}
}
|