我在 GameViewController 中制作了游戏菜单。然后,当按下 Go 按钮时,我尝试移动到 GameScene。我使用默认代码来呈现 GameScene 文件。
if let scene = GameScene(fileNamed:"GameScene") {
// Configure the view.
let skView = self.view as! SKView
skView.showsFPS = false
skView.showsNodeCount = false
/* Sprite Kit applies additional optimizations to improve rendering performance */
skView.ignoresSiblingOrder = true
/* Set the scale mode to scale to fit the window */
scene.scaleMode = .AspectFill
skView.presentScene(scene)
}
我在 Storyboard中制作了菜单。我认为这就是它不起作用的原因。我该如何解决这个问题?
尼尔
最佳答案
在SpriteKit中我们使用场景,GameScene位于上面的GameViewController中。 GameViewController 向您显示 GameScene。
关于swift - 没有从 GameViewController 菜单移动到 GameScene Swift,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39560878/