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); } }
void Player::CollisionUnderPlayer(EntityPtr entity) { AllowToJump(); Jump(6); AddScores(entity->GetScoresWhenKilled() * 2); entity->KilledByPlayer(); }