summary refs log tree commit diff stats
path: root/Classes/GameModeSelectionLayer.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/GameModeSelectionLayer.m')
-rw-r--r--Classes/GameModeSelectionLayer.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/Classes/GameModeSelectionLayer.m b/Classes/GameModeSelectionLayer.m index db08146..3fbf417 100644 --- a/Classes/GameModeSelectionLayer.m +++ b/Classes/GameModeSelectionLayer.m
@@ -14,6 +14,7 @@
14#import "TutorialMode.h" 14#import "TutorialMode.h"
15#import "ClassicGameMode.h" 15#import "ClassicGameMode.h"
16#import "NMPanelMenu.h" 16#import "NMPanelMenu.h"
17#import "JumpGameMode.h"
17 18
18@implementation GameModeSelectionLayer 19@implementation GameModeSelectionLayer
19 20
@@ -56,6 +57,17 @@
56 57
57 [gameModes addObject:collectSelection]; 58 [gameModes addObject:collectSelection];
58 59
60 GameModeSelection* jumpSelection;
61
62 if ([defaults boolForKey:@"unlockedJumpMode"])
63 {
64 jumpSelection = [GameModeSelection selectionWithName:@"Jump" location:@"Venice" filename:@"venice" unlocked:YES];
65 } else {
66 jumpSelection = [GameModeSelection selectionWithName:@"Jump" location:@"Venice" filename:@"venice" unlockCondition:@"Get 5000 points in Collect!"];
67 }
68
69 [gameModes addObject:jumpSelection];
70
59 CCMenu* menu = [CCMenu menuWithItems:nil]; 71 CCMenu* menu = [CCMenu menuWithItems:nil];
60 float onePanelWide = 128; 72 float onePanelWide = 128;
61 float padding = 15; 73 float padding = 15;
@@ -126,6 +138,9 @@
126 } else if ([gameMode.name isEqual:@"Collect"]) 138 } else if ([gameMode.name isEqual:@"Collect"])
127 { 139 {
128 [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]]; 140 [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]];
141 } else if ([gameMode.name isEqual:@"Jump"])
142 {
143 [[CCDirector sharedDirector] replaceScene:[JumpGameMode scene]];
129 } 144 }
130} 145}
131 146