summary refs log tree commit diff stats
path: root/Classes/ClassicGameMode.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/ClassicGameMode.m')
-rwxr-xr-xClasses/ClassicGameMode.m14
1 files changed, 13 insertions, 1 deletions
diff --git a/Classes/ClassicGameMode.m b/Classes/ClassicGameMode.m index 88c52ce..b8fe636 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
@@ -27,7 +28,7 @@
27 { 28 {
28 [self unscheduleAllSelectors]; 29 [self unscheduleAllSelectors];
29 30
30 [[CCDirector sharedDirector] replaceScene:[CCTransitionSlideInT transitionWithDuration:1.5f scene:[GameOverScene sceneWithScore:score]]]; 31 [[CCDirector sharedDirector] replaceScene:[CCTransitionSlideInT transitionWithDuration:1.5f scene:[GameOverScene sceneWithScore:score gameMode:@"Collect"]]];
31 } else if (score > lastScore) 32 } else if (score > lastScore)
32 { 33 {
33 if ((lastScore < 6500) && (score >= 6500)) 34 if ((lastScore < 6500) && (score >= 6500))
@@ -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:)];