summary refs log tree commit diff stats
path: root/Classes/MainMenuLayer.m
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-08-17 12:54:22 -0400
committerStarla Insigna <starla4444@gmail.com>2011-08-17 12:54:22 -0400
commitfee8d3506b4c2f6d5933a85181de9bb8e6f5fcc4 (patch)
tree6b45cb1d47551ab0cbcd4d45a919212db6a6aaed /Classes/MainMenuLayer.m
parentc55c499656ed089df63b049979487e9af9d109d6 (diff)
downloadcartcollect-fee8d3506b4c2f6d5933a85181de9bb8e6f5fcc4.tar.gz
cartcollect-fee8d3506b4c2f6d5933a85181de9bb8e6f5fcc4.tar.bz2
cartcollect-fee8d3506b4c2f6d5933a85181de9bb8e6f5fcc4.zip
Made tutorial replayable
Closes #202
Diffstat (limited to 'Classes/MainMenuLayer.m')
-rwxr-xr-xClasses/MainMenuLayer.m21
1 files changed, 10 insertions, 11 deletions
diff --git a/Classes/MainMenuLayer.m b/Classes/MainMenuLayer.m index 50c595f..537c5c1 100755 --- a/Classes/MainMenuLayer.m +++ b/Classes/MainMenuLayer.m
@@ -44,10 +44,11 @@
44 //CCLabelBMFont* menuItemLabel2 = [CCLabelBMFont labelWithString:@"Highscores" fntFile:@"getoffthatboatrightnowyounglady.fnt"]; 44 //CCLabelBMFont* menuItemLabel2 = [CCLabelBMFont labelWithString:@"Highscores" fntFile:@"getoffthatboatrightnowyounglady.fnt"];
45 //CCMenuItemLabel* menuItem2 = [CCMenuItemLabel itemWithLabel:menuItemLabel2 target:self selector:@selector(highscores)]; 45 //CCMenuItemLabel* menuItem2 = [CCMenuItemLabel itemWithLabel:menuItemLabel2 target:self selector:@selector(highscores)];
46 46
47 CCMenuItemImage* menuItem1 = [CCMenuItemImage itemFromNormalImage:@"newgame.png" selectedImage:@"newgame2.png" target:self selector:@selector(newgame)]; 47 CCMenuItemImage* newgameMenuItem = [CCMenuItemImage itemFromNormalImage:@"newgame.png" selectedImage:@"newgame2.png" target:self selector:@selector(newgame)];
48 CCMenuItemImage* menuItem2 = [CCMenuItemImage itemFromNormalImage:@"highscores.png" selectedImage:@"highscores2.png" target:self selector:@selector(highscores)]; 48 CCMenuItemImage* tutorialMenuItem = [CCMenuItemImage itemFromNormalImage:@"tutorial.png" selectedImage:@"tutorial2.png" target:self selector:@selector(tutorial)];
49 CCMenuItemImage* highscoresMenuItem = [CCMenuItemImage itemFromNormalImage:@"highscores.png" selectedImage:@"highscores2.png" target:self selector:@selector(highscores)];
49 50
50 CCMenu* menu = [CCMenu menuWithItems:menuItem1, menuItem2, nil]; 51 CCMenu* menu = [CCMenu menuWithItems:newgameMenuItem, tutorialMenuItem, highscoresMenuItem, nil];
51 [menu alignItemsVertically]; 52 [menu alignItemsVertically];
52 menu.position = ccp(240, 100); 53 menu.position = ccp(240, 100);
53 [self addChild:menu]; 54 [self addChild:menu];
@@ -58,14 +59,12 @@
58 59
59- (void)newgame 60- (void)newgame
60{ 61{
61 NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults]; 62 [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]];
62 63}
63 if ([defaults boolForKey:@"hasDoneTutorial"]) 64
64 { 65- (void)tutorial
65 [[CCDirector sharedDirector] replaceScene:[ClassicGameMode scene]]; 66{
66 } else { 67 [[CCDirector sharedDirector] replaceScene:[TutorialMode scene]];
67 [[CCDirector sharedDirector] replaceScene:[TutorialMode scene]];
68 }
69} 68}
70 69
71- (void)highscores 70- (void)highscores