summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xClasses/ClassicGameMode.m5
-rw-r--r--Classes/GameModeInfo.m5
2 files changed, 9 insertions, 1 deletions
diff --git a/Classes/ClassicGameMode.m b/Classes/ClassicGameMode.m index 00bf049..e9085f2 100755 --- a/Classes/ClassicGameMode.m +++ b/Classes/ClassicGameMode.m
@@ -51,7 +51,10 @@ static GameModeInfo* info;
51 [[CCDirector sharedDirector] replaceScene:[CCTransitionSlideInT transitionWithDuration:1.5f scene:[GameOverScene sceneWithScore:score gameMode:[ClassicGameMode info]]]]; 51 [[CCDirector sharedDirector] replaceScene:[CCTransitionSlideInT transitionWithDuration:1.5f scene:[GameOverScene sceneWithScore:score gameMode:[ClassicGameMode info]]]];
52 } else if (score > lastScore) 52 } else if (score > lastScore)
53 { 53 {
54 if ((lastScore < 6500) && (score >= 6500)) 54 if ((lastScore < 10000) && (score >= 10000))
55 {
56 [[ClassicGameMode info] setStar:2 withMessage:@"Get 10000 points"];
57 } else if ((lastScore < 6500) && (score >= 6500))
55 { 58 {
56 [self unschedule:@selector(randomlyAddObject:)]; 59 [self unschedule:@selector(randomlyAddObject:)];
57 [self schedule:@selector(randomlyAddObject:) interval:0.6f]; 60 [self schedule:@selector(randomlyAddObject:) interval:0.6f];
diff --git a/Classes/GameModeInfo.m b/Classes/GameModeInfo.m index 08b95e5..91543fa 100644 --- a/Classes/GameModeInfo.m +++ b/Classes/GameModeInfo.m
@@ -34,6 +34,11 @@
34 unlocked = m_unlocked; 34 unlocked = m_unlocked;
35 } 35 }
36 36
37 if (numOfStars > 3)
38 {
39 @throw [NSException exceptionWithName:NSInvalidArgumentException reason:@"There does not exist support for more than three stars in a game mode." userInfo:nil];
40 }
41
37 stars = (BOOL*) calloc(numOfStars, sizeof(BOOL)); 42 stars = (BOOL*) calloc(numOfStars, sizeof(BOOL));
38 for (int i=0; i<numOfStars; i++) 43 for (int i=0; i<numOfStars; i++)
39 { 44 {