void DiggingWorld::update( float fElapsedTime ) { // update the button height CCSpriteBatchNode *pMainBatchNode = LayerGaming::sharedLayerGaming()->getTilesBatchNode(); float fBatchNodePosY = pMainBatchNode->getPositionY(); m_fCurrentBottomHeight = fBatchNodePosY / m_fTileSize + m_fTileCountPerColumn; bool bGameOver = true; for( DiggingPathVector::iterator iter = m_diggingPaths.begin(); iter != m_diggingPaths.end(); ++iter ) { (*iter)->update( fElapsedTime ); if( !(*iter)->isPathClosed() ) bGameOver = false; } if( bGameOver ) SceneManager::replaceGameOverScene(); }