예제 #1
0
bool Jeu::connecter(int port, const std::string& adresseIp)
{
	m_client = new ng::ClientTCP(adresseIp, port);

	if (m_client->port() != 0)
		return true;

	deconnecter();
	return false;
}
예제 #2
0
파일: Tapis.cpp 프로젝트: padenot/usdp
void Tapis::deroulerTapis(double dt)
{
    QVector2D deplacement(_tronconSupport->position() - _position);
    deplacement.normalize();
    deplacement *= _vitesse*dt;

    // Pour chaque bagage sur le tapis
    for (QVector<Bagage*>::iterator it = _bagages.begin() ;
        it != _bagages.end() && _chariotConnecte != 0;
        ++it)
    {
        (*it)->simulerDeplacement(deplacement);

        if(bagageEstSorti(*it))
        {
            _chariotConnecte->chargerBagage(*it);
            _bagages.erase(it);
            deconnecter();
        }
    }
}
예제 #3
0
Jeu::~Jeu()
{
	reinitialiser();
	deconnecter();
}