func joystick1() -> (xCoordinate:String, yCoordinate:String) {
let outside1 = Circle(radius: 8)
outside1.borderColor = #colorLiteral(red: 0.0352941192686558, green: 0.117647059261799, blue: 0.164705887436867, alpha: 1.0)
outside1.color = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
let inside1 = Circle(radius: 2)
inside1.draggable = true
//-25, -40
inside1.center.x = -40
inside1.center.y = -25
outside1.center.x = -40
outside1.center.y = -25
inside1.onTouchUp {
return (inside1.center.x, inside1.center.y)
inside1.center.x = -40
inside1.center.y = -25
}
inside1.onTouchDrag {
}
}
此代码给出了错误:
“void函数中出现意外的非void返回值”