Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Sets _squareOneNumber to 0
- _squareOneNumber = 0;
- //Sets positions and creates a CGPoint which will animate the image
- CGPoint originalPosition = self.squareOne.center;
- originalPosition.y = -55;
- [self.squareOne setCenter:originalPosition];
- CGPoint position = self.squareOne.center;
- position.y += 790;
- //Shows Image
- [self.squareOne setHidden:NO];
- if (self.squareOneNumber==0) {
- if (a==b) {
- [self gameOverImagePutter];
- NSLog(@"One wasn't pressed");
- }
- }
- //In touchesBegan method
- UITouch *touch = [touches anyObject];
- CGPoint touchLocation = [touch locationInView:self.view];
- if ([self.squareOne.layer.presentationLayer hitTest:touchLocation]) {
- [_squareOne setHidden:YES];
- _squareOneNumber = 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement