Exemple #1
0
void HighscoreData::UpdateHighscore(Highscore PlayerScore)
{
	if (this->Player.getScore() != PlayerScore.getScore()) // if my highscore is not player score
	{
		this->Player.addScore(PlayerScore.getScore()); // add the score
		AddScores(this->Player);
		MergeSortHighscore(this->scores, 0, MAX_SCORES - 1);
	}
}
Exemple #2
0
void Player::CollisionUnderPlayer(EntityPtr entity) {
    AllowToJump();
    Jump(6);
    AddScores(entity->GetScoresWhenKilled() * 2);
    entity->KilledByPlayer();
}