How to know 2 touch event changed to 1 touch in Sprite Kit

138 views Asked by At

I am trying to identify in my sprite kit game when a multi touch of 2 touches changes to 1 touch, Like 2 thumbs to 1 thumb. So there are no new touch events so I attempted to find the change in the touchesMoved function. I have tried doing things like this...

override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) {
    if event.allTouches()?.count > 1 && self.shieldActivated {

        println("two touches moved")
    } else {
        println("1 touch moved")
    }
}

I am able to see when there are two touches and one of the touches leaves the screen but it also picks up when one of the touches just moves so it doesn't work. self.shieldActivated is just a Boolean that tells that the touchesBegan event with 2 fingers did occur. I couldn't find anything else that seemed to do the trick. Does anyone have any ideas? thanks!

0

There are 0 answers