diff options
Diffstat (limited to 'Classes/GameMode.m')
-rw-r--r-- | Classes/GameMode.m | 45 |
1 files changed, 1 insertions, 44 deletions
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 @@ | |||
12 | 12 | ||
13 | @implementation GameMode | 13 | @implementation GameMode |
14 | 14 | ||
15 | @synthesize cart, score, lives, isPaused, pointMultiplier; | 15 | @synthesize cart; |
16 | 16 | ||
17 | - (id)init | 17 | - (id)init |
18 | { | 18 | { |
@@ -28,18 +28,6 @@ | |||
28 | cart.delegate = self; | 28 | cart.delegate = self; |
29 | [self addChild:cart.sprite]; | 29 | [self addChild:cart.sprite]; |
30 | 30 | ||
31 | scoreLabel = [CCLabelBMFont labelWithString:@"Score: 0" fntFile:@"helvetica2.fnt"]; | ||
32 | scoreLabel.position = ccp(50, 300); | ||
33 | [self addChild:scoreLabel]; | ||
34 | |||
35 | livesLabel = [CCLabelBMFont labelWithString:@"Lives: 3" fntFile:@"helvetica2.fnt"]; | ||
36 | livesLabel.position = ccp(50, 280); | ||
37 | [self addChild:livesLabel]; | ||
38 | |||
39 | score = 0; | ||
40 | lives = 3; | ||
41 | pointMultiplier = 1; | ||
42 | |||
43 | objectFactory = [[FallingObjectFactory alloc] init]; | 31 | objectFactory = [[FallingObjectFactory alloc] init]; |
44 | 32 | ||
45 | isPaused = NO; | 33 | isPaused = NO; |
@@ -187,37 +175,6 @@ | |||
187 | [alert release]; | 175 | [alert release]; |
188 | } | 176 | } |
189 | 177 | ||
190 | - (void)setScore:(int)m_score | ||
191 | { | ||
192 | score = m_score; | ||
193 | |||
194 | if (pointMultiplier > 1) | ||
195 | { | ||
196 | [scoreLabel setString:[NSString stringWithFormat:@"Score: %d x%d", score, pointMultiplier]]; | ||
197 | } else { | ||
198 | [scoreLabel setString:[NSString stringWithFormat:@"Score: %d", score]]; | ||
199 | } | ||
200 | } | ||
201 | |||
202 | - (void)setLives:(int)m_lives | ||
203 | { | ||
204 | lives = m_lives; | ||
205 | |||
206 | [livesLabel setString:[NSString stringWithFormat:@"Lives: %d", lives]]; | ||
207 | } | ||
208 | |||
209 | - (void)setPointMultiplier:(int)m_pointMultiplier | ||
210 | { | ||
211 | pointMultiplier = m_pointMultiplier; | ||
212 | |||
213 | if (pointMultiplier > 1) | ||
214 | { | ||
215 | [scoreLabel setString:[NSString stringWithFormat:@"Score: %d x%d", score, pointMultiplier]]; | ||
216 | } else { | ||
217 | [scoreLabel setString:[NSString stringWithFormat:@"Score: %d", score]]; | ||
218 | } | ||
219 | } | ||
220 | |||
221 | - (void)scheduleDelayedAction:(void(^)(void))m_delayedAction delay:(float)delay | 178 | - (void)scheduleDelayedAction:(void(^)(void))m_delayedAction delay:(float)delay |
222 | { | 179 | { |
223 | delayedAction = Block_copy([m_delayedAction retain]); | 180 | delayedAction = Block_copy([m_delayedAction retain]); |