sprite kit - How to choose which scene shows up first spritekit/swift? -
where declared scene show first on load of app? first file made game shows first, if i'm wanting switch main menu pops first, how , do that?
thanks
in view controller, first scene set. default, it's automatically set gamescene can change altering code in gamescene. should change line in unarchive file: let scene = archiver.decodeobjectforkey(nskeyedarchiverootobjectkey) as! gamescene
let scene = archiver.decodeobjectforkey(nskeyedarchiverootobjectkey) as! scenename
, line in didmovetoview if let scene = gamescene.unarchivefromfile("gamescene") as? gamescene {
if let scene = gamescene.unarchivefromfile("gamescene") as? scenename {
cause game load scenename, or whatever scene called initial scene.
Comments
Post a Comment