From 5af6401805f65a9b5968625d565613dd83edcfc7 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Mon, 5 Sep 2011 12:33:06 -0400 Subject: 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 --- Classes/JumpGameMode.m | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Classes') 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 @@ [self addChild:ledge]; [ledges addObject:ledge]; + CCSprite* firstLedge = ledge; + ledge = [CCSprite spriteWithTexture:[[CCTexture2D alloc] initWithImage:[factory createLedgeWithWidth:10 height:2]]]; + ledge.position = ccp(80 + firstLedge.boundingBox.size.width/2 + ledge.boundingBox.size.width/2+64, 32); + [self addChild:ledge]; + [ledges addObject:ledge]; + ledgeScrollSpeed = 0; ledgeAccelerationRate = 20.0f; addSpeed = 2.5f; -- cgit 1.4.1