i'm trying present menu (gameviewcontroller). try execute move in gamescene:
let secondviewcontroller:gameviewcontroller = gameviewcontroller() self.presentviewcontroller(secondviewcontroller, animated: true, completion: nil)
but there's error on self.presentviewcontroller(secondviewcontroller, animated: true, completion: nil)
line says "value of type 'gamescene' has no member 'presentviewcontroller' in swift". can't execute move using .presentviewcontroller , needs done programmatically , without using segues , has able used in skscene.
thanks in advance, niall
according apple, every different scene or screen in game should presented different skscene
object.
a single gameviewcontoller
, single skview
can used present lot of different scenes main menu , levels in game.
for example inside skscene
class reference skview
using self.view
, tell present main menu skscene
.
Comments
Post a Comment