Beispiel #1
0
Player::Player(float maxVel, float acceleration, float xPos, float yPos):
	_head( maxVel, acceleration, xPos, yPos ),
	_bodyParts(  )
{
	for(int i = 0; i < 3; i++){
		BodyPart bodyPart(250,250);
		_bodyParts.push_back(bodyPart);
	}
}
Beispiel #2
0
void Player::update(bool aim, int xMouse, int yMouse, const Uint8 *keyState, Food *food)
{
	float xHead = 0;
	float yHead = 0;
	_head.getPos(&xHead, &yHead);
	
	updateBody(xHead, yHead);
	_head.update(aim, xMouse, yMouse, keyState);
	
	int eat = checkFood(food);
	if(eat){
		BodyPart bodyPart(xHead, yHead);
		_bodyParts.push_back(bodyPart);
	}
}
Beispiel #3
0
void sendEmail(const char * to, const char * subject, const char * body, const char * mailServer, unsigned port, const char * sender, StringArray *warnings)
{
    CMailInfo info(to, subject, mailServer, port, sender, warnings);
    CTextMailPart bodyPart(body, "text/plain; charset=ISO-8859-1", NULL);
    doSendEmail(info, bodyPart);
}