Ejemplo n.º 1
0
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());
    }
}
Ejemplo n.º 3
0
void		Enemy::updateCollision()
{
	if(outOfThisWorld())
		return;
	checkForAndResolveCollisions();
}