File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -70,16 +70,14 @@ - (void)setupApplication
70
70
#endif
71
71
}
72
72
73
- // Override if you want to create your first scene somehow other than by loading a ccb file.
73
+ /*
74
+ Instantiate and return the first scene
75
+ */
74
76
- (CCScene *)createFirstScene
75
77
{
76
78
return [CCBReader loadAsScene: self .firstSceneName];
77
79
}
78
80
79
-
80
- /*
81
- Instantiate and return the first scene
82
- */
83
81
- (CCScene *)startScene
84
82
{
85
83
NSAssert (_glView.director, @" Require a valid director to decode the CCB file!" );
@@ -99,10 +97,15 @@ - (NSDictionary*)iosConfig
99
97
configPath = [configPath stringByAppendingPathComponent: @" configCocos2d.plist" ];
100
98
101
99
NSMutableDictionary *config = [NSMutableDictionary dictionaryWithContentsOfFile: configPath];
102
-
100
+ if (config == nil ){
101
+ config = [NSMutableDictionary dictionary ];
102
+ }
103
+
103
104
// Fixed size. As wide as iPhone 5 at 2x and as high as the iPad at 2x.
104
105
config[CCScreenModeFixedDimensions] = [NSValue valueWithCGSize: CGSizeMake (586 , 384 )];
105
106
107
+ [CCBReader configureCCFileUtils ];
108
+
106
109
return config;
107
110
}
108
111
@@ -112,8 +115,6 @@ - (void)setupIOS
112
115
{
113
116
_cocosConfig = [self iosConfig ];
114
117
115
- [CCBReader configureCCFileUtils ];
116
-
117
118
[self applyConfigurationToCocos: _cocosConfig];
118
119
[self setFirstScene ];
119
120
}
You can’t perform that action at this time.
0 commit comments