0
MenuScene에서 GameScene으로 장면 전환을 시도하고 있습니다. 나는 여기에 갇혀있다. GameScene 클래스를 완성 했으므로이 오류가 왜 여기에 있는지 확신 할 수 없습니다.인수 레이블 '(fileNamed :)'과 사용 가능한 오버로드가 일치하지 않습니다.
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
for touch in touches {
let location = touch.location(in: self)
if atPoint(location).name == "Play" {
let scene = GameScene(fileNamed: "GameSene") //error
scene?.scaleMode = .aspectFill
self.view?.presentScene(gameplay!, transition: SKTransition.doorway(withDuration: 1))
}
if atPoint(location).name == "Highscore" {
scoreLabel.removeFromParent()
createLabel()
}}
유형'GameScene ('로 작동하고 엑스 코드에서 알 수 무엇을 보일 것입니다. – vadian
오류는 무엇입니까? 또한'GameScene' 코드를 우리와 공유 할 수 있습니까? – Fahim
아마 Scene = GameScene (fileNamed : "GameSene")에 오타가있을 수 있습니다. 아마도 GameScene 이거나 GameScene.sks 파일을 만들지 않았을 것입니다. –