【发布时间】:2016-11-03 09:06:56
【问题描述】:
在 watchOS 3 中使用 SpriteKit 时,如何处理触摸事件?我正在从 iOS 移植 SpriteKit 游戏,下面的代码将不起作用。或者你必须以某种方式控制 WKInterfaceController?
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {}
override func touchesMoved(_ touches: Set<UITouch>, with event: UIEvent?) {}
override func touchesCancelled(_ touches: Set<UITouch>, with event: UIEvent?) {}
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {}
【问题讨论】:
标签: sprite-kit watchkit watchos-3