summary refs log tree commit diff stats
path: root/Classes/PointMultiplier.m
diff options
context:
space:
mode:
authorStarla Insigna <starla4444@gmail.com>2011-09-10 10:04:18 -0400
committerStarla Insigna <starla4444@gmail.com>2011-09-10 10:04:18 -0400
commitab9f7381455b334fa0df563e21775410be74ea45 (patch)
tree531ffb35abf20c8a75103a66c7de0a7136b11d24 /Classes/PointMultiplier.m
parentb090d12d637e5cfbf0ac6955fa6c8d401de657b5 (diff)
downloadcartcollect-ab9f7381455b334fa0df563e21775410be74ea45.tar.gz
cartcollect-ab9f7381455b334fa0df563e21775410be74ea45.tar.bz2
cartcollect-ab9f7381455b334fa0df563e21775410be74ea45.zip
Added point multipliers
There is support for point multipliers for any game mode, but only Jump currently utilizes it.

Closes #222
Diffstat (limited to 'Classes/PointMultiplier.m')
-rw-r--r--Classes/PointMultiplier.m36
1 files changed, 36 insertions, 0 deletions
diff --git a/Classes/PointMultiplier.m b/Classes/PointMultiplier.m new file mode 100644 index 0000000..a14bf68 --- /dev/null +++ b/Classes/PointMultiplier.m
@@ -0,0 +1,36 @@
1//
2// PointMultiplier.m
3// Cartographic
4//
5// Created by Starla Insigna on 9/10/11.
6// Copyright (c) 2011 Four Island. All rights reserved.
7//
8
9#import "PointMultiplier.h"
10#import "GameMode.h"
11#import "SimpleAudioEngine.h"
12
13@implementation PointMultiplier
14
15- (id)init
16{
17 self = [super init];
18
19 if (nil != self)
20 {
21 sprite = [CCSprite spriteWithFile:@"multiplier.png"];
22 weight = 8;
23 }
24
25 return self;
26}
27
28- (void)collideWithCart
29{
30 GameMode* gameLayer = ((GameMode*) sprite.parent);
31 [gameLayer setPointMultiplier:gameLayer.pointMultiplier+1];
32
33 [[SimpleAudioEngine sharedEngine] playEffect:[[NSBundle mainBundle] pathForResource:@"Item1" ofType:@"wav"]];
34}
35
36@end