我在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)
}
我在情节提要中制作了菜单。我认为这就是为什么它不起作用。我该如何解决?
尼尔
最佳答案
在SpriteKit中,我们使用场景,GameScene在GameViewController中。
GameViewController向您显示GameScene。
关于swift - 不从GameViewController菜单移动到GameScene Swift,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/39560878/