2015-10-05 81 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)