0
touchesBegan 기능을 사용할 수 없습니다. 사용자가 노드를 터치하면 호출되지 않습니다.SKSpriteNode에서 터치 이벤트가 감지되지 않습니다.
import SpriteKit
class SimpleButton: SKSpriteNode {
//called when the user taps the button
override func touchesBegan(touches: NSSet!, withEvent event: UIEvent!) {
println("touches began")
}
//called when the user finishes touching the button
override func touchesEnded(touches: NSSet!, withEvent event: UIEvent!) {
println("touches ended")
}
override func touchesMoved(touches: NSSet!, withEvent event: UIEvent!) {
println("touches moved")
}
}