diff options
Diffstat (limited to 'Classes/Rock.m')
| -rwxr-xr-x | Classes/Rock.m | 12 | 
1 files changed, 11 insertions, 1 deletions
| diff --git a/Classes/Rock.m b/Classes/Rock.m index a3b3b9e..aac1aaf 100755 --- a/Classes/Rock.m +++ b/Classes/Rock.m | |||
| @@ -7,7 +7,8 @@ | |||
| 7 | // | 7 | // | 
| 8 | 8 | ||
| 9 | #import "Rock.h" | 9 | #import "Rock.h" | 
| 10 | 10 | #import "GameMode.h" | |
| 11 | #import "SimpleAudioEngine.h" | ||
| 11 | 12 | ||
| 12 | @implementation Rock | 13 | @implementation Rock | 
| 13 | 14 | ||
| @@ -24,4 +25,13 @@ | |||
| 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:@"Damage1" ofType:@"wav"]]; | ||
| 34 | } | ||
| 35 | |||
| 36 | |||
| 27 | @end | 37 | @end | 
