Skip to content

Commit

Permalink
Fixed bug with CCSpriteMultiTouch scale and rotate set to one finger
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkemose committed Jul 31, 2014
1 parent 32697f7 commit e13980d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Extensions/CCSpriteMultiTouch/CCSpriteMultiTouch.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#define CCSpriteMultiTouchMaxTouches 3
#define CCSpriteMultiTouchFuntionDisable 0
#define CCSpriteMinTouchCountForScaleAndRotate 2

//----------------------------------------------------------------------

Expand Down Expand Up @@ -145,11 +146,15 @@ - (void)touchMoved:(UITouch *)touch withEvent:(UIEvent *)event
// check for dragging
if (_touchCount == _touchCountForDrag) [self touchDrag];

// check for scaling
if (_touchCount == _touchCountForScale) [self touchScale];
if (_touchCount >= CCSpriteMinTouchCountForScaleAndRotate)
{
// check for scaling
if (_touchCount == _touchCountForScale) [self touchScale];

// check for rotation
if (_touchCount == _touchCountForRotate) [self touchRotate];
}

// check for rotation
if (_touchCount == _touchCountForRotate) [self touchRotate];
}

//----------------------------------------------------------------------
Expand Down
Binary file not shown.

0 comments on commit e13980d

Please sign in to comment.