Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. //Sets _squareOneNumber to 0
  2. _squareOneNumber = 0;
  3.  
  4. //Sets positions and creates a CGPoint which will animate the image
  5. CGPoint originalPosition = self.squareOne.center;
  6. originalPosition.y = -55;
  7. [self.squareOne setCenter:originalPosition];
  8.  
  9. CGPoint position = self.squareOne.center;
  10. position.y += 790;
  11.  
  12. //Shows Image
  13. [self.squareOne setHidden:NO];
  14.  
  15. if (self.squareOneNumber==0) {
  16. if (a==b) {
  17. [self gameOverImagePutter];
  18. NSLog(@"One wasn't pressed");
  19. }
  20. }
  21.  
  22. //In touchesBegan method
  23. UITouch *touch = [touches anyObject];
  24. CGPoint touchLocation = [touch locationInView:self.view];
  25.  
  26. if ([self.squareOne.layer.presentationLayer hitTest:touchLocation]) {
  27. [_squareOne setHidden:YES];
  28. _squareOneNumber = 1;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement