Skip to content

Commit

Permalink
score debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Napolitain committed Jan 13, 2022
1 parent 0a1c7b9 commit daef06e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/game/scenegraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,17 +354,17 @@ void SceneGraph::update(TimeStep deltaTime) {
mainDecor->setTransform(transform);
background->setTransform(transformBackGround);
soleil->setTransform(transformY);
updateScore(score1, player->score);
updateScore(score1, (int) player->score % 10);
if (player->score >= 10) {
updateScore(score2, player->score / 10);
updateScore(score2, ((int) player->score / 10) % 100);
addEntity(m_root, score2);
}
if (player->score >= 100) {
updateScore(score3, player->score / 100);
updateScore(score3, ((int) player->score / 100) % 1000);
addEntity(m_root, score3);
}
if (player->score >= 1000) {
updateScore(score4, player->score / 1000);
updateScore(score4, ((int) player->score / 1000 % 10000));
addEntity(m_root, score4);
}

Expand Down

0 comments on commit daef06e

Please sign in to comment.