summary refs log tree commit diff stats
path: root/Classes/OneUp.m
diff options
context:
space:
mode:
Diffstat (limited to 'Classes/OneUp.m')
-rwxr-xr-xClasses/OneUp.m11
1 files changed, 10 insertions, 1 deletions
diff --git a/Classes/OneUp.m b/Classes/OneUp.m index e09935c..9e0d4f0 100755 --- a/Classes/OneUp.m +++ b/Classes/OneUp.m
@@ -7,7 +7,8 @@
7// 7//
8 8
9#import "OneUp.h" 9#import "OneUp.h"
10 10#import "GameMode.h"
11#import "SimpleAudioEngine.h"
11 12
12@implementation OneUp 13@implementation OneUp
13 14
@@ -24,4 +25,12 @@
24 return self; 25 return self;
25} 26}
26 27
28- (void)collideWithCart
29{
30 GameMode* gameLayer = ((GameMode*) sprite.parent);
31 [gameLayer setLives:gameLayer.lives+1];
32
33 [[SimpleAudioEngine sharedEngine] playEffect:[[NSBundle mainBundle] pathForResource:@"1up" ofType:@"wav"]];
34}
35
27@end 36@end