equal
deleted
inserted
replaced
162 } |
162 } |
163 } |
163 } |
164 |
164 |
165 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { |
165 - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { |
166 initialDistance = 0; |
166 initialDistance = 0; |
167 NSLog(@"touches ended, sigh"); |
167 // NSLog(@"touches ended, sigh"); |
168 |
168 |
169 HW_allKeysUp(); |
169 HW_allKeysUp(); |
170 /*NSEnumerator *enumerator = [touches objectEnumerator]; |
170 /*NSEnumerator *enumerator = [touches objectEnumerator]; |
171 UITouch *touch=nil; |
171 UITouch *touch=nil; |
172 |
172 |
214 NSLog(@"Vertical swipe detected, begY:%f curY:%f", gestureStartPoint.y, currentPosition.y); |
214 NSLog(@"Vertical swipe detected, begY:%f curY:%f", gestureStartPoint.y, currentPosition.y); |
215 if (Ydiff > 0) HW_aimUp(); |
215 if (Ydiff > 0) HW_aimUp(); |
216 else HW_aimDown(); |
216 else HW_aimDown(); |
217 } |
217 } |
218 |
218 |
|
219 // end pinch detection |
219 if (2 == [touches count]) { |
220 if (2 == [touches count]) { |
220 NSArray *twoTouches = [touches allObjects]; |
221 NSArray *twoTouches = [touches allObjects]; |
221 UITouch *first = [twoTouches objectAtIndex:0]; |
222 UITouch *first = [twoTouches objectAtIndex:0]; |
222 UITouch *second = [twoTouches objectAtIndex:1]; |
223 UITouch *second = [twoTouches objectAtIndex:1]; |
223 CGFloat currentDistance = distanceBetweenPoints([first locationInView:self], [second locationInView:self]); |
224 CGFloat currentDistance = distanceBetweenPoints([first locationInView:self], [second locationInView:self]); |