diff options
author | Starla Insigna <starla4444@gmail.com> | 2011-09-09 13:05:25 -0400 |
---|---|---|
committer | Starla Insigna <starla4444@gmail.com> | 2011-09-09 13:05:25 -0400 |
commit | d8ac1ed69d9361a2d16a3a762c5dd4f74a51fde0 (patch) | |
tree | 64e5af58d2a598981693ce9cb7bfad912bcb7ee1 /Classes | |
parent | a9f61d5df9bd2a9fec365ba7110e5ec09148cf1a (diff) | |
download | cartcollect-d8ac1ed69d9361a2d16a3a762c5dd4f74a51fde0.tar.gz cartcollect-d8ac1ed69d9361a2d16a3a762c5dd4f74a51fde0.tar.bz2 cartcollect-d8ac1ed69d9361a2d16a3a762c5dd4f74a51fde0.zip |
Fixed negative lives behavior
The negative lives glitch was being caused by players being killed by two different things at once--a.k.a. being hit by a rock and falling off a ledge in Jump. The problem was that both game modes would only show the game over screen if the player had zero lives, not for negative lives. This has been fixed. Fixes #220
Diffstat (limited to 'Classes')
-rwxr-xr-x | Classes/ClassicGameMode.m | 2 | ||||
-rw-r--r-- | Classes/JumpGameMode.m | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Classes/ClassicGameMode.m b/Classes/ClassicGameMode.m index c925419..46ad337 100755 --- a/Classes/ClassicGameMode.m +++ b/Classes/ClassicGameMode.m | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | [super tick:dt]; | 26 | [super tick:dt]; |
27 | 27 | ||
28 | if (lives == 0) | 28 | if (lives <= 0) |
29 | { | 29 | { |
30 | [self unscheduleAllSelectors]; | 30 | [self unscheduleAllSelectors]; |
31 | 31 | ||
diff --git a/Classes/JumpGameMode.m b/Classes/JumpGameMode.m index 93e05ea..0cf916a 100644 --- a/Classes/JumpGameMode.m +++ b/Classes/JumpGameMode.m | |||
@@ -154,7 +154,7 @@ | |||
154 | cart.sprite.position = ccp(cart.sprite.position.x, 320 + cart.sprite.boundingBox.size.height/2); | 154 | cart.sprite.position = ccp(cart.sprite.position.x, 320 + cart.sprite.boundingBox.size.height/2); |
155 | } | 155 | } |
156 | 156 | ||
157 | if (lives == 0) | 157 | if (lives <= 0) |
158 | { | 158 | { |
159 | [self unscheduleAllSelectors]; | 159 | [self unscheduleAllSelectors]; |
160 | 160 | ||