As title says, is there any method that I can call to load a SKScene
from a file (.SKS) without calling the init(fileNamed: "...")
method?
Asked
Active
Viewed 361 times
7

mnuages
- 13,049
- 2
- 23
- 40

Alec Firtulescu
- 543
- 6
- 18
-
What's wrong with `init(fileNamed: "...")`? Is there some behaviour you wanted that it doesn't have? – ABakerSmith Jun 25 '15 at 08:23
-
1Actually, I can't override init(fileNamed: String) method, and I need to pass one more parameter. – Alec Firtulescu Jun 25 '15 at 08:38
1 Answers
0
You can do like this:
float screenWidth = [UIScreen mainScreen].bounds.size.width;
float screenHeight = [UIScreen mainScreen].bounds.size.height;
GameScene *scene = [[GameScene alloc]initWithSize:CGSizeMake(screenWidth, screenHeight)];
Keep Coding......... :)

Krishna Raj Salim
- 7,331
- 5
- 34
- 66