From 9f4bf94a763afba795fb991006081505c3ae466b Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Thu, 25 Aug 2011 13:30:00 -0400 Subject: 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 --- Classes/GameModeSelectionLayer.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Classes/GameModeSelectionLayer.m') 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 @@ #import "TutorialMode.h" #import "ClassicGameMode.h" #import "NMPanelMenu.h" +#import "JumpGameMode.h" @implementation GameModeSelectionLayer @@ -56,6 +57,17 @@ [gameModes addObject:collectSelection]; + GameModeSelection* jumpSelection; + + if ([defaults boolForKey:@"unlockedJumpMode"]) + { + jumpSelection = [GameModeSelection selectionWithName:@"Jump" location:@"Venice" filename:@"venice" unlocked:YES]; + } else { + jumpSelection = [GameModeSelection selectionWithName:@"Jump" location:@"Venice" filename:@"venice" unlockCondition:@"Get 5000 points in Collect!"]; + } + + [gameModes addObject:jumpSelection]; + CCMenu* menu = [CCMenu menuWithItems:nil]; float onePanelWide = 128; float padding = 15; @@ -126,6 +138,9 @@ } else if ([gameMode.name isEqual:@"Collect"]) { [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]]; + } else if ([gameMode.name isEqual:@"Jump"]) + { + [[CCDirector sharedDirector] replaceScene:[JumpGameMode scene]]; } } -- cgit 1.4.1