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/ClassicGameMode.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Classes/ClassicGameMode.m') diff --git a/Classes/ClassicGameMode.m b/Classes/ClassicGameMode.m index 88c52ce..c1d3be7 100755 --- a/Classes/ClassicGameMode.m +++ b/Classes/ClassicGameMode.m @@ -14,6 +14,7 @@ #import "Rock.h" #import "GameOverScene.h" #import "SimpleAudioEngine.h" +#import "CCNotifications.h" @implementation ClassicGameMode @@ -35,6 +36,17 @@ [self unschedule:@selector(randomlyAddObject:)]; [self schedule:@selector(randomlyAddObject:) interval:0.6f]; addSpeed = 0.6f; + } else if ((lastScore < 5000) && (score >= 5000)) + { + NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; + + if (![defaults boolForKey:@"unlockedJumpMode"]) + { + [[CCNotifications sharedManager] addWithTitle:@"Jump" message:@"You've unlocked a new game mode!" image:@"venice.png"]; + + [defaults setBool:YES forKey:@"unlockedJumpMode"]; + [defaults synchronize]; + } } else if ((lastScore < 4500) && (score >= 4500)) { [self unschedule:@selector(randomlyAddObject:)]; -- cgit 1.4.1