Skip to content

Commit

Permalink
Stop updating after game over, initialize current level variable
Browse files Browse the repository at this point in the history
  • Loading branch information
alinradut committed Sep 18, 2011
1 parent e08749a commit a727f63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/GameLayer.cpp
Expand Up @@ -54,6 +54,8 @@ bool GameLayer::init()

asteroids_ = new CCMutableArray<CCSprite *>();
bullets_ = new CCMutableArray<CCSprite *>();

currentLevel_ = 0;

this->startLevel();

Expand Down Expand Up @@ -351,6 +353,7 @@ void GameLayer::resetShip()
void GameLayer::gameOver()
{
this->resetShip();
this->unscheduleUpdate();

ship_->setIsVisible(false);

Expand Down

0 comments on commit a727f63

Please sign in to comment.