From 7eb543b37f42f708611f969de2d813a5457c54d8 Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Fri, 4 Jan 2013 16:26:04 -0500 Subject: Created score bar Closes #190 --- Classes/GameMode.m | 45 +-------------------------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) (limited to 'Classes/GameMode.m') diff --git a/Classes/GameMode.m b/Classes/GameMode.m index ca269cd..956e512 100644 --- a/Classes/GameMode.m +++ b/Classes/GameMode.m @@ -12,7 +12,7 @@ @implementation GameMode -@synthesize cart, score, lives, isPaused, pointMultiplier; +@synthesize cart; - (id)init { @@ -28,18 +28,6 @@ cart.delegate = self; [self addChild:cart.sprite]; - scoreLabel = [CCLabelBMFont labelWithString:@"Score: 0" fntFile:@"helvetica2.fnt"]; - scoreLabel.position = ccp(50, 300); - [self addChild:scoreLabel]; - - livesLabel = [CCLabelBMFont labelWithString:@"Lives: 3" fntFile:@"helvetica2.fnt"]; - livesLabel.position = ccp(50, 280); - [self addChild:livesLabel]; - - score = 0; - lives = 3; - pointMultiplier = 1; - objectFactory = [[FallingObjectFactory alloc] init]; isPaused = NO; @@ -187,37 +175,6 @@ [alert release]; } -- (void)setScore:(int)m_score -{ - score = m_score; - - if (pointMultiplier > 1) - { - [scoreLabel setString:[NSString stringWithFormat:@"Score: %d x%d", score, pointMultiplier]]; - } else { - [scoreLabel setString:[NSString stringWithFormat:@"Score: %d", score]]; - } -} - -- (void)setLives:(int)m_lives -{ - lives = m_lives; - - [livesLabel setString:[NSString stringWithFormat:@"Lives: %d", lives]]; -} - -- (void)setPointMultiplier:(int)m_pointMultiplier -{ - pointMultiplier = m_pointMultiplier; - - if (pointMultiplier > 1) - { - [scoreLabel setString:[NSString stringWithFormat:@"Score: %d x%d", score, pointMultiplier]]; - } else { - [scoreLabel setString:[NSString stringWithFormat:@"Score: %d", score]]; - } -} - - (void)scheduleDelayedAction:(void(^)(void))m_delayedAction delay:(float)delay { delayedAction = Block_copy([m_delayedAction retain]); -- cgit 1.4.1