I am writing a small game in swift, in which a boat has to go around obstacles. However, I keep getting this "missing argument for parameter #2 in call" error in CGRectInersectsRect. I have checked how to call it in the directory, and am calling it correctly. What is the issue with my code?. Here it is:
if (CGRectIntersectsRect(boat: CGRect, obstacleImageView: CGRect)) {
endGame()
}
}
if (CGRectIntersectsRect(boat.frame, obstacleImageView.frame)) { endGame() } }
CGRect
is a type of the parameter. It shouldn't be used when calling the function.