void Level::update(float dt) { if (_gameOver) { return; } _player->updatePosition(dt); checkForWin(); checkForAndResolveCollisions(_player); handleCollectCoins(_player); setViewpointCenter(_player->getPosition()); }
void GameLevelLayer::update(float delta) { if (m_isGameOver) { return; } if (m_pPlayer) { m_pPlayer->update(delta); handleHazardCollisions(m_pPlayer); checkForWin(); checkForAndResolveCollisions(m_pPlayer); setViewpointCenter(m_pPlayer->getPosition()); } }
void Enemy::updateCollision() { if(outOfThisWorld()) return; checkForAndResolveCollisions(); }