diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-09-05 12:24:04 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-09-05 12:24:04 -0400 |
commit | ef9cab24b9ee3e25ab00d932fbab2f2a91476950 (patch) | |
tree | 64181097c4ba8f5e2fd7ad5efcebac37adff83c5 /Classes/GameModeSelectionLayer.m | |
parent | c505b38ac0ad593ee7c4e56895a06a69878a88d3 (diff) | |
download | cartcollect-ef9cab24b9ee3e25ab00d932fbab2f2a91476950.tar.gz cartcollect-ef9cab24b9ee3e25ab00d932fbab2f2a91476950.tar.bz2 cartcollect-ef9cab24b9ee3e25ab00d932fbab2f2a91476950.zip |
Added zoom/fade transition to selection screen
Refs #207
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 | ||