void GameBoard::timerEvent(QTimerEvent *) { encart(); flameAnim(); splashScreen(); movementMario(); movementPeach(); movementEncart(); getModel()->brickOrganisation(); goldAnim(); intersectPeachMario(); shockAnim(); hurted(); GameOver(); Peach(); view->repaint(); }
void Rythm::update(sf::Time elapsedTime) { generateWaves(elapsedTime); for(std::list<Wave*>::iterator it = _waves.begin() ; it != _waves.end() ; ++it) { if(!(*it)->isAlive() || (*it)->isMissed()) { if((*it)->isMissed()) { hurted(); _heart.breakCombo(); } delete *it; it = _waves.erase(it); } } _elapsedTime += elapsedTime; for(std::list<Wave*>::const_iterator it = _waves.begin() ; it != _waves.end() ; ++it) { (*it)->update(elapsedTime, _deltaTimeWaves); } if(sf::Keyboard::isKeyPressed(sf::Keyboard::Return) && _elapsedTime > sf::milliseconds(100) && !_security) { beatWave(); _elapsedTime = _elapsedTime.Zero; _security = true; } else if(!sf::Keyboard::isKeyPressed(sf::Keyboard::Return)) _security = false; _heart.update(); if(!_heart.isAlive()) { _isTheEnd = true; } }