回答編集履歴
1
一部コードが違っていた。
test
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
修正しました。
|
2
2
|
|
3
3
|
|
4
4
|
|
@@ -6,15 +6,17 @@
|
|
6
6
|
|
7
7
|
func SteIdou(bbb:String){
|
8
8
|
|
9
|
-
let bundleName = Bundle.main.infoDictionary?[kCFBundleNameKey as String] as? String
|
9
|
+
let bundleName = Bundle.main.infoDictionary?[kCFBundleNameKey as String] as? String
|
10
10
|
|
11
|
-
let fullName = "(bundleName!).(bbb)"
|
11
|
+
let fullName = "(bundleName!).(bbb)"
|
12
12
|
|
13
|
-
let sceneType = NSClassFromString(fullName) as! SKScene.Type
|
13
|
+
let sceneType = NSClassFromString(fullName) as! SKScene.Type
|
14
14
|
|
15
|
-
|
15
|
+
var scene = sceneType.init(size: self.size)
|
16
16
|
|
17
|
+
scene = sceneType.init(fileNamed: bbb)!
|
18
|
+
|
17
|
-
let tr = SKTransition.fade(withDuration: 1)
|
19
|
+
let tr = SKTransition.fade(withDuration: 1)
|
18
20
|
|
19
21
|
self.view!.presentScene(scene,transition: tr)
|
20
22
|
|