나는 게임을 만들고 그리고 난이이 오류 코드와 함께 충돌 왜 내 코드를 편집 할 사람을 찾고 :SpriteKit에서 오류가 발생했습니다. - 스레드 1 : EXC_BREAKPOINT (코드 = 1, 서브 코드 = 0x1007351fc)
스레드 1 : EXC_BREAKPOINT (코드 = 1, 서브 코드 = 0x1007351fc는)
여기 내 코드입니다 : 귀하의 질문에 몇 줄이 있습니다
import UIKit
import SpriteKit
class Winner: SKScene {
override init(size: CGSize) {
super.init(size: size)
backgroundColor = SKColor (red: CGFloat(248), green: CGFloat(248), blue: CGFloat(248), alpha: CGFloat(255)) //UIColor
var message = "Great Job! "
let label = SKLabelNode(fontNamed: "AppleSDGothicNeo-Bold")
label.text = message
label.fontSize = 22
label.fontColor = SKColor.blue
self.backgroundColor = SKColor.black
label.position = CGPoint(x: size.width/2, y: size.height/2)
addChild(label)
run(SKAction.sequence([
SKAction.wait(forDuration: 1.0),
SKAction.run() {
let reveal = SKTransition.flipHorizontal(withDuration: 1.0)
let scene = GameOver(size: self.size)
self.view?.presentScene(scene, transition:reveal)
}
]))
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
도움 주셔서 감사합니다. 장면으로 전환 할 때부터 내 오류가 발생하는 업데이트 된 질문을 확인할 수 있습니까? – Robert
Congratulations 클래스를 어떻게 작성했는지에 따라 코드가 달라질 수 있습니다. –
내 코드를 한 번 더 업데이트했습니다. 축하 수업을 볼 수 있습니다. – Robert