diff options
Diffstat (limited to 'Classes/TutorialMode.m')
-rw-r--r-- | Classes/TutorialMode.m | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/Classes/TutorialMode.m b/Classes/TutorialMode.m index 37e8bd0..ed51648 100644 --- a/Classes/TutorialMode.m +++ b/Classes/TutorialMode.m | |||
@@ -12,7 +12,7 @@ | |||
12 | #import "Bottle.h" | 12 | #import "Bottle.h" |
13 | #import "OneUp.h" | 13 | #import "OneUp.h" |
14 | #import "Rock.h" | 14 | #import "Rock.h" |
15 | #import "ClassicGameMode.h" | 15 | #import "MainMenuLayer.h" |
16 | 16 | ||
17 | // Item tags: | 17 | // Item tags: |
18 | // 2000 - first dropped item | 18 | // 2000 - first dropped item |
@@ -35,11 +35,6 @@ | |||
35 | backgroundImage.position = ccp(240, 160); | 35 | backgroundImage.position = ccp(240, 160); |
36 | [self addChild:backgroundImage z:-1]; | 36 | [self addChild:backgroundImage z:-1]; |
37 | 37 | ||
38 | CCMenuItemImage* menuItem1 = [CCMenuItemImage itemFromNormalImage:@"skiptutorial.png" selectedImage:@"skiptutorial2.png" target:self selector:@selector(skipTutorial)]; | ||
39 | CCMenu* theMenu = [CCMenu menuWithItems:menuItem1, nil]; | ||
40 | theMenu.position = ccp(480-16-16-62, 320-8-16); | ||
41 | [self addChild:theMenu]; | ||
42 | |||
43 | showedDeathBubble = NO; | 38 | showedDeathBubble = NO; |
44 | randomItemsDropped = 0; | 39 | randomItemsDropped = 0; |
45 | } | 40 | } |
@@ -201,10 +196,7 @@ | |||
201 | [self schedule:@selector(randomlyAddObject:) interval:1.0f]; | 196 | [self schedule:@selector(randomlyAddObject:) interval:1.0f]; |
202 | } else if ([currentTutorial.name isEqual:@"end"]) | 197 | } else if ([currentTutorial.name isEqual:@"end"]) |
203 | { | 198 | { |
204 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | 199 | [[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:3.0f scene:[MainMenuLayer scene] withColor:ccc3(0,0,0)]]; |
205 | [defaults setBool:YES forKey:@"hasDoneTutorial"]; | ||
206 | |||
207 | [[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:3.0f scene:[ClassicGameMode scene] withColor:ccc3(0,0,0)]]; | ||
208 | } | 200 | } |
209 | 201 | ||
210 | self.currentTutorial = nil; | 202 | self.currentTutorial = nil; |
@@ -335,15 +327,4 @@ | |||
335 | randomItemsDropped++; | 327 | randomItemsDropped++; |
336 | } | 328 | } |
337 | 329 | ||
338 | - (void)skipTutorial | ||
339 | { | ||
340 | [self unscheduleAllSelectors]; | ||
341 | self.currentTutorial = nil; | ||
342 | |||
343 | NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; | ||
344 | [defaults setBool:YES forKey:@"hasDoneTutorial"]; | ||
345 | |||
346 | [[CCDirector sharedDirector] replaceScene:[CCTransitionFlipY transitionWithDuration:1.0f scene:[ClassicGameMode scene]]]; | ||
347 | } | ||
348 | |||
349 | @end | 330 | @end |