by returnvoid » Tue Dec 18, 2012 12:37 pm
It works! finally I did:
-(id)init{
if(self = [super init]){
//omitted code
touchCounter = 0;
}
return self;
}
- (void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
for(UITouch *touch in touches) {
touchCounter = 1;
[multi beginLocation:TouchLocation(touch)];
}
}
- (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
for(UITouch *touch in touches) [multi updateLocation:TouchLocation(touch)];
}
- (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
for(UITouch *touch in touches){
if(touchCounter == 1){
touchCounter = 0;
[multi endLocation:TouchLocation(touch)];
}
}
}
This way I know if ccTouchesBegan was registered because I have another events for navigation, so this solution is perfect, thanks