override func viewWillLayoutSubviews() {
let bgMusicURL:NSURL = NSBundle.mainBundle().URLForResource("bgmusic", withExtension: "mp3")!
backgroundMusicPlayer = try! AVAudioPlayer(contentsOfURL: bgMusicURL)
backgroundMusicPlayer.numberOfLoops = -1
backgroundMusicPlayer.prepareToPlay()
backgroundMusicPlayer.play()
// Configure the view
let skView:SKView = self.view as! SKView
//skView.showsFPS = true
//skView.showsNodeCount = true
// Create and Configure the sciene
let scene:SKScene = GameScene(size: skView.bounds.size)
scene.scaleMode = SKSceneScaleMode.AspectFill
skView.presentScene(scene)
我越来越
EXC_BAD_INSTRUCTION(代码=EXC_I386_INVOP,子代码=0x0)
它甚至在应用程序启动之前就崩溃了。顺便说一句,编程新手。
谢谢你