Пример #1
0
void Game::SetCup(Cup *cup)
{
	if(this->cup)delete this->cup;
	this->cup=cup;
	if(survive)
	{
		connect(this,SIGNAL(PlayerSurvived(uchar)),this->cup,SLOT(PlayerSurvive(uchar)));
	}
	else
	{
		connect(this,SIGNAL(PlayerDied(uchar,uchar)),this->cup,SLOT(PlayerDie(uchar,uchar)));
	}
	connect(cup,SIGNAL(PlayerPointChanged(uchar,int)),this,SLOT(ChangePlayerPoint(uchar,int)));
	connect(cup,SIGNAL(PlayerWonTheCup(uchar,QString)),this,SLOT(PlayerWinTheCup(uchar,QString)));
}
Пример #2
0
static void BorderCollisionNotifier(int id, int othertype, int otherid, double n[2], double depth, int usev)
{
	if (othertype == ID_PLAYER)
		PlayerDie();
}