File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
271
271
[self blastPowerUp ];
272
272
}
273
273
}else if (dY<-minfac){
274
- if (!_using2ndPowerup){
274
+ if (!_using2ndPowerup && _eligiblefor2ndPowerup> 0 ){
275
275
_using2ndPowerup = true ;
276
276
_eligiblefor2ndPowerup = -2000 ;
277
277
_powerup2Timer = 500 ;
@@ -474,6 +474,11 @@ -(void)gameOver{
474
474
}
475
475
476
476
477
+ /*
478
+ Utility method that deals with removing the second powerup.
479
+ @param: none
480
+ @return: none
481
+ */
477
482
-(void )removeSecondPowerup {
478
483
[_sheildPowerup removeFromParent ];
479
484
_using2ndPowerup = false ;
@@ -557,6 +562,7 @@ -(void)update:(CFTimeInterval)currentTime {
557
562
if ([_player intersectsNode: tempBlock.blockSprite]){
558
563
if (_using2ndPowerup){
559
564
[self removeSecondPowerup ];
565
+ [self blastPowerUp ];
560
566
}else {
561
567
[self gameOver ];
562
568
}
You can’t perform that action at this time.
0 commit comments