Quantcast
Channel: iOS SDK Development Forums — iPhone Dev SDK
Viewing all articles
Browse latest Browse all 45

Need to stop buffered taps from being executed

$
0
0
I have a situation, where I tap one side of the screen and I need an animation to complete, it works fine, if I dont tap it too fast, but if i tap repeatedly, it seems taps are buffered, than instead of having the execution of 1 tap, 2 or 3 in a row are executed, this is the code I have...


     /// If Right Side Tap....
                
                                        
                    let wait = SKAction.wait(forDuration: 0.32)
                    let run = SKAction.run
                    {
                            self.opponent.createAnimations("get_straight_head_R")
                    }
                    self.run(SKAction.sequence([wait, run]))


I tried using isUserInteractionEnabled set to false, within the brackets, but that didnt work, i set it to true outside the brackets.

Viewing all articles
Browse latest Browse all 45

Trending Articles