diff options
Diffstat (limited to 'Classes/TutorialMode.m')
| -rw-r--r-- | Classes/TutorialMode.m | 24 |
1 files changed, 22 insertions, 2 deletions
| diff --git a/Classes/TutorialMode.m b/Classes/TutorialMode.m index 156b939..54f4e16 100644 --- a/Classes/TutorialMode.m +++ b/Classes/TutorialMode.m | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #import "FallingObject.h" | 10 | #import "FallingObject.h" |
| 11 | #import "GameModeSelectionLayer.h" | 11 | #import "GameModeSelectionLayer.h" |
| 12 | #import "SimpleAudioEngine.h" | 12 | #import "SimpleAudioEngine.h" |
| 13 | #import "ClassicGameMode.h" | ||
| 13 | 14 | ||
| 14 | // Item tags: | 15 | // Item tags: |
| 15 | // 2000 - first dropped item | 16 | // 2000 - first dropped item |
| @@ -30,6 +31,26 @@ typedef enum { | |||
| 30 | 31 | ||
| 31 | @synthesize currentTutorial; | 32 | @synthesize currentTutorial; |
| 32 | 33 | ||
| 34 | static GameModeInfo* info; | ||
| 35 | |||
| 36 | + (GameModeInfo*)info | ||
| 37 | { | ||
| 38 | if (info == nil) | ||
| 39 | { | ||
| 40 | info = [[GameModeInfo alloc] initWithName:@"Tutorial" | ||
| 41 | location:@"Florence" | ||
| 42 | numOfStars:0 | ||
| 43 | imageFilename:[[NSBundle mainBundle] pathForResource:@"florence" ofType:@"png"] | ||
| 44 | unlocked:YES | ||
| 45 | unlockCondition:nil | ||
| 46 | gameClass:[TutorialMode class] | ||
| 47 | globalHighscoreKey:nil | ||
| 48 | starsToUnlock:0]; | ||
| 49 | } | ||
| 50 | |||
| 51 | return info; | ||
| 52 | } | ||
| 53 | |||
| 33 | - (id)init | 54 | - (id)init |
| 34 | { | 55 | { |
| 35 | self = [super init]; | 56 | self = [super init]; |
| @@ -357,8 +378,7 @@ typedef enum { | |||
| 357 | 378 | ||
| 358 | [self unschedule:@selector(randomlyAddObject:)]; | 379 | [self unschedule:@selector(randomlyAddObject:)]; |
| 359 | 380 | ||
| 360 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | 381 | [[ClassicGameMode info] unlock]; |
| 361 | [defaults setBool:YES forKey:@"hasDoneTutorial"]; | ||
| 362 | 382 | ||
| 363 | return; | 383 | return; |
| 364 | } else { | 384 | } else { |
