【发布时间】:2015-10-31 03:49:44
【问题描述】:
我正在制作一个带有移动角色和旋转武器的 ios 游戏,它可以运行,但是我休息了一个月,然后 ios 更新到了 9。我的代码不再有效并给我一个错误。错误是什么,更重要的是我该如何解决?
override func touchesMoved(touches: Set<NSObject>, withEvent event: UIEvent) {
for touch in (touches as! Set<UITouch>) {
let location = touch.locationInNode(self)
if (leftButton.containsPoint(location)){
leftPressed = true
}else{
leftPressed = false
}
if (rightButton.containsPoint(location)){
rightPressed = true
}else{
rightPressed = false
}
}
}
这是我收到错误的代码 sn-ps 之一。这是错误:方法没有覆盖其超类中的任何方法
【问题讨论】:
标签: swift