147 |
147 |
148 // finally launch game and remove this controller |
148 // finally launch game and remove this controller |
149 DLog(@"sending config %@", gameDictionary); |
149 DLog(@"sending config %@", gameDictionary); |
150 |
150 |
151 if ([[gameDictionary allKeys] count] == 9) { |
151 if ([[gameDictionary allKeys] count] == 9) { |
|
152 UIView *black = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width)]; |
|
153 black.opaque = YES; |
|
154 black.backgroundColor = [UIColor blackColor]; |
|
155 [self.view addSubview:black]; |
152 [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary]; |
156 [[SDLUIKitDelegate sharedAppDelegate] startSDLgame:gameDictionary]; |
|
157 [UIView beginAnimations:@"fading in from ingame" context:NULL]; |
|
158 [UIView setAnimationDuration:1]; |
|
159 black.alpha = 0; |
|
160 [UIView commitAnimations]; |
|
161 [black performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1]; |
|
162 [black performSelector:@selector(release) withObject:nil afterDelay:1]; |
153 } else { |
163 } else { |
154 DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n", |
164 DLog(@"gameconfig data not complete!!\nmapConfigViewController = %@\nteamConfigViewController = %@\nschemeWeaponConfigViewController = %@\n", |
155 mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController); |
165 mapConfigViewController, teamConfigViewController, schemeWeaponConfigViewController); |
156 [self.parentViewController dismissModalViewControllerAnimated:YES]; |
166 [self.parentViewController dismissModalViewControllerAnimated:YES]; |
157 |
167 |