summary refs log tree commit diff stats
path: root/Classes/GameOverScene.m
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-09-04 11:17:44 -0400
committerStarla Insigna <starla4444@gmail.com>2011-09-04 11:17:44 -0400
commit339f8e2cb2fce18f6d32b3881a5cd390c0be488e (patch)
treecb17c635d664838259e591f4b345ae6349931d49 /Classes/GameOverScene.m
parent9f4bf94a763afba795fb991006081505c3ae466b (diff)
downloadcartcollect-339f8e2cb2fce18f6d32b3881a5cd390c0be488e.tar.gz
cartcollect-339f8e2cb2fce18f6d32b3881a5cd390c0be488e.tar.bz2
cartcollect-339f8e2cb2fce18f6d32b3881a5cd390c0be488e.zip
Implemented Jump mode (BETA) jump
Dear god this is beta. I think I'll release a build for the testers soon so I can see what people think and then hammer out the bugs.

Refs #204
Diffstat (limited to 'Classes/GameOverScene.m')
-rwxr-xr-xClasses/GameOverScene.m9
1 files changed, 5 insertions, 4 deletions
diff --git a/Classes/GameOverScene.m b/Classes/GameOverScene.m index 94236ff..f2dca0b 100755 --- a/Classes/GameOverScene.m +++ b/Classes/GameOverScene.m
@@ -14,12 +14,12 @@
14 14
15@implementation GameOverScene 15@implementation GameOverScene
16 16
17+ (GameOverScene*)sceneWithScore:(int)score 17+ (GameOverScene*)sceneWithScore:(int)score gameMode:(NSString*)gameMode
18{ 18{
19 return [[[GameOverScene alloc] initWithScore:score] autorelease]; 19 return [[[GameOverScene alloc] initWithScore:score gameMode:gameMode] autorelease];
20} 20}
21 21
22- (id)initWithScore:(int)score2 22- (id)initWithScore:(int)score2 gameMode:(NSString*)gameMode2
23{ 23{
24 self = [super init]; 24 self = [super init];
25 25
@@ -36,6 +36,7 @@
36 [theLayer addChild:backgroundImage z:0]; 36 [theLayer addChild:backgroundImage z:0];
37 37
38 score = score2; 38 score = score2;
39 gameMode = gameMode2;
39 40
40 movingLayer = [[UIView alloc] initWithFrame:CGRectMake(0, -320, 480, 320)]; 41 movingLayer = [[UIView alloc] initWithFrame:CGRectMake(0, -320, 480, 320)];
41 movingLayer.backgroundColor = [UIColor clearColor]; 42 movingLayer.backgroundColor = [UIColor clearColor];
@@ -88,7 +89,7 @@
88 textField.enabled = NO; 89 textField.enabled = NO;
89 submitSwitch.enabled = NO; 90 submitSwitch.enabled = NO;
90 91
91 const char* sqlQuery = [[NSString stringWithFormat:@"INSERT INTO highscores (name, score, gameMode) VALUES (\"%@\",%d,\"Collect\")", [textField text], score] UTF8String]; 92 const char* sqlQuery = [[NSString stringWithFormat:@"INSERT INTO highscores (name, score, gameMode) VALUES (\"%@\",%d,\"%@\")", [textField text], score, gameMode] UTF8String];
92 sqlite3_stmt* compiled_statement; 93 sqlite3_stmt* compiled_statement;
93 94
94 if (sqlite3_prepare_v2([Cart_CollectAppDelegate database], sqlQuery, -1, &compiled_statement, NULL) == SQLITE_OK) 95 if (sqlite3_prepare_v2([Cart_CollectAppDelegate database], sqlQuery, -1, &compiled_statement, NULL) == SQLITE_OK)