summary refs log tree commit diff stats
path: root/Classes
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-09-05 12:33:06 -0400
committerStarla Insigna <starla4444@gmail.com>2011-09-05 12:33:06 -0400
commit5af6401805f65a9b5968625d565613dd83edcfc7 (patch)
tree93a4ffda8838a5f1327a81b444ce3ea4c3f83c5e /Classes
parentef9cab24b9ee3e25ab00d932fbab2f2a91476950 (diff)
downloadcartcollect-5af6401805f65a9b5968625d565613dd83edcfc7.tar.gz
cartcollect-5af6401805f65a9b5968625d565613dd83edcfc7.tar.bz2
cartcollect-5af6401805f65a9b5968625d565613dd83edcfc7.zip
Added default ledges to Jump
Previously, in Jump, when the game mode was created, one static ledge would always be generated safely under the player, and then when tick was first called, it would fill in the rest of the screen with ledges. While this did use to work fine, now that the game modes transition in, the player can see the ledges being added in when the transition ends so now there are two default ledges present when the level starts.

Refs #204
Diffstat (limited to 'Classes')
-rw-r--r--Classes/JumpGameMode.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Classes/JumpGameMode.m b/Classes/JumpGameMode.m index 79c87bc..907effc 100644 --- a/Classes/JumpGameMode.m +++ b/Classes/JumpGameMode.m
@@ -61,6 +61,12 @@
61 [self addChild:ledge]; 61 [self addChild:ledge];
62 [ledges addObject:ledge]; 62 [ledges addObject:ledge];
63 63
64 CCSprite* firstLedge = ledge;
65 ledge = [CCSprite spriteWithTexture:[[CCTexture2D alloc] initWithImage:[factory createLedgeWithWidth:10 height:2]]];
66 ledge.position = ccp(80 + firstLedge.boundingBox.size.width/2 + ledge.boundingBox.size.width/2+64, 32);
67 [self addChild:ledge];
68 [ledges addObject:ledge];
69
64 ledgeScrollSpeed = 0; 70 ledgeScrollSpeed = 0;
65 ledgeAccelerationRate = 20.0f; 71 ledgeAccelerationRate = 20.0f;
66 addSpeed = 2.5f; 72 addSpeed = 2.5f;