diff options
Diffstat (limited to 'Classes/GameModeSelectionLayer.m')
-rw-r--r-- | Classes/GameModeSelectionLayer.m | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Classes/GameModeSelectionLayer.m b/Classes/GameModeSelectionLayer.m index ef1d922..17b9d33 100644 --- a/Classes/GameModeSelectionLayer.m +++ b/Classes/GameModeSelectionLayer.m | |||
@@ -15,6 +15,7 @@ | |||
15 | #import "ClassicGameMode.h" | 15 | #import "ClassicGameMode.h" |
16 | #import "NMPanelMenu.h" | 16 | #import "NMPanelMenu.h" |
17 | #import "JumpGameMode.h" | 17 | #import "JumpGameMode.h" |
18 | #import "ZoomFadeTransition.h" | ||
18 | 19 | ||
19 | @implementation GameModeSelectionLayer | 20 | @implementation GameModeSelectionLayer |
20 | 21 | ||
@@ -132,15 +133,20 @@ | |||
132 | 133 | ||
133 | - (void)didSelectGameMode:(GameModeSelection *)gameMode | 134 | - (void)didSelectGameMode:(GameModeSelection *)gameMode |
134 | { | 135 | { |
136 | [pageControl removeFromSuperview]; | ||
137 | |||
138 | CGPoint opp = [scrollView convertPoint:gameMode.position toView:[[CCDirector sharedDirector] openGLView]]; | ||
139 | CGPoint endPosition = ccp(0-(opp.x+158), opp.y); | ||
140 | |||
135 | if ([gameMode.name isEqual:@"Tutorial"]) | 141 | if ([gameMode.name isEqual:@"Tutorial"]) |
136 | { | 142 | { |
137 | [[CCDirector sharedDirector] replaceScene:[TutorialMode scene]]; | 143 | [[CCDirector sharedDirector] replaceScene:[ZoomFadeTransition transitionWithDuration:5.0f scene:[TutorialMode scene] position:endPosition]]; |
138 | } else if ([gameMode.name isEqual:@"Collect"]) | 144 | } else if ([gameMode.name isEqual:@"Collect"]) |
139 | { | 145 | { |
140 | [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]]; | 146 | [[CCDirector sharedDirector] replaceScene:[ZoomFadeTransition transitionWithDuration:5.0f scene:[ClassicGameMode scene] position:endPosition]]; |
141 | } else if ([gameMode.name isEqual:@"Jump"]) | 147 | } else if ([gameMode.name isEqual:@"Jump"]) |
142 | { | 148 | { |
143 | [[CCDirector sharedDirector] replaceScene:[JumpGameMode scene]]; | 149 | [[CCDirector sharedDirector] replaceScene:[ZoomFadeTransition transitionWithDuration:5.0f scene:[JumpGameMode scene] position:endPosition]]; |
144 | } | 150 | } |
145 | } | 151 | } |
146 | 152 | ||