diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-08-25 13:30:00 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-08-25 13:30:00 -0400 |
commit | 9f4bf94a763afba795fb991006081505c3ae466b (patch) | |
tree | 759a02f12cfabf21ae1ebee1c053b29779e3b1d1 /Classes/ClassicGameMode.m | |
parent | 55c94570ae9b7a31167705350dde0a4162058f9b (diff) | |
download | cartcollect-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/ClassicGameMode.m')
-rwxr-xr-x | Classes/ClassicGameMode.m | 12 |
1 files changed, 12 insertions, 0 deletions
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 @@ | |||
14 | #import "Rock.h" | 14 | #import "Rock.h" |
15 | #import "GameOverScene.h" | 15 | #import "GameOverScene.h" |
16 | #import "SimpleAudioEngine.h" | 16 | #import "SimpleAudioEngine.h" |
17 | #import "CCNotifications.h" | ||
17 | 18 | ||
18 | @implementation ClassicGameMode | 19 | @implementation ClassicGameMode |
19 | 20 | ||
@@ -35,6 +36,17 @@ | |||
35 | [self unschedule:@selector(randomlyAddObject:)]; | 36 | [self unschedule:@selector(randomlyAddObject:)]; |
36 | [self schedule:@selector(randomlyAddObject:) interval:0.6f]; | 37 | [self schedule:@selector(randomlyAddObject:) interval:0.6f]; |
37 | addSpeed = 0.6f; | 38 | addSpeed = 0.6f; |
39 | } else if ((lastScore < 5000) && (score >= 5000)) | ||
40 | { | ||
41 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | ||
42 | |||
43 | if (![defaults boolForKey:@"unlockedJumpMode"]) | ||
44 | { | ||
45 | [[CCNotifications sharedManager] addWithTitle:@"Jump" message:@"You've unlocked a new game mode!" image:@"venice.png"]; | ||
46 | |||
47 | [defaults setBool:YES forKey:@"unlockedJumpMode"]; | ||
48 | [defaults synchronize]; | ||
49 | } | ||
38 | } else if ((lastScore < 4500) && (score >= 4500)) | 50 | } else if ((lastScore < 4500) && (score >= 4500)) |
39 | { | 51 | { |
40 | [self unschedule:@selector(randomlyAddObject:)]; | 52 | [self unschedule:@selector(randomlyAddObject:)]; |