Skip to content

Instantly share code, notes, and snippets.

@suisho
Last active August 29, 2015 14:21
Show Gist options
  • Save suisho/03012c348c196579df6b to your computer and use it in GitHub Desktop.
Save suisho/03012c348c196579df6b to your computer and use it in GitHub Desktop.
swiftでYMCPhysicsDebuggerが使えなかった話(showsPhysicsを使おう) ref: http://qiita.com/suisho/items/81ec4aa3e197086bb3ab
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
if let scene = GameScene.unarchiveFromFile("GameScene") as? GameScene {
// Configure the view.
let skView = self.view as! SKView
skView.showsFPS = true
skView.showsNodeCount = true
skView.ignoresSiblingOrder = true
skView.showsPhysics = true // これ
scene.scaleMode = .AspectFit
skView.presentScene(scene)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment