summary refs log tree commit diff stats
path: root/Classes/GameModeSelectionLayer.m
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-08-25 13:30:00 -0400
committerStarla Insigna <starla4444@gmail.com>2011-08-25 13:30:00 -0400
commit9f4bf94a763afba795fb991006081505c3ae466b (patch)
tree759a02f12cfabf21ae1ebee1c053b29779e3b1d1 /Classes/GameModeSelectionLayer.m
parent55c94570ae9b7a31167705350dde0a4162058f9b (diff)
downloadcartcollect-9f4bf94a763afba795fb991006081505c3ae466b.tar.gz
cartcollect-9f4bf94a763afba795fb991006081505c3ae466b.tar.bz2
cartcollect-9f4bf94a763afba795fb991006081505c3ae466b.zip
Added Jump to selection screen
It currently uses a temporary picture and is unlockable after reaching 5000 points in Collect, at which point a little notification appears at the top of the screen telling you that you've unlocked a new game mode. Also fixed a bug in GameMode with the iteration of objects that would cause the rest of tick to not be called because objects were removed from the set while it was being iterated over.

Refs #204
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