0
我特林創建一個遊戲菜單,我得到了這樣的事情如何改變場景的MouseDown
class StartGame: SKScene {
override func didMoveToView(view: SKView) {
backgroundColor = SKColor.blackColor()
let startButton = SKSpriteNode(imageNamed: "startGame")
startButton.position = CGPointMake(size.width/2, size.height/2)
startButton.name = "startButton"
addChild(startButton)
}
override func mouseDown(theEvent: NSEvent) {
if( ... )
}
}
有ofcourse會更喜歡「保存遊戲」,「退出」和類似按鈕那。還有我的問題。我想通過點擊一個名爲「startGame」