2015-10-05 87 views

回答

0

所以基本上我从游戏中通过代码,你会看到有什么区别:

override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?){ 
    if let touch = touches.first { 

     // detecting touch location 
     let touchLocation = touch.locationInNode(self) 

     //your code going here 
} 

这种方法工作得很好。尝试使用它而不是你的。 (我用Swift 2.0)