How to detect the location of a mouseDown event using Swift?
With the following code snippet, I get the error "Cannot find type 'NSEvent' in scope"?
import SpriteKit
func mouseDown(with event: NSEvent) {
if let ourScene = GameScene(fileNamed: "GameScene") {
let location = event.location(in: view)
let node:SKNode = ourScene.atPoint(location)
if (node.name == "creditsInfo") {
showCredits()
}
} // if let ourScene
} // mouseDown
Anybody have a floodlight to shine on this very basic error?