mirror of
https://github.com/modelec/ihm.git
synced 2026-01-18 16:47:32 +01:00
score
This commit is contained in:
14
InGame.cpp
14
InGame.cpp
@@ -41,9 +41,9 @@ InGame::InGame(QWidget *parent) : QWidget(parent) {
|
||||
connect(this->timer, &QTimer::timeout, this, &InGame::updateTime);
|
||||
}
|
||||
|
||||
void InGame::updateScode(const int score) const
|
||||
void InGame::updateScode() const
|
||||
{
|
||||
this->pts->setText("Points : " + QString::number(score));
|
||||
this->pts->setText("Points : " + QString::number(this->score));
|
||||
}
|
||||
|
||||
void InGame::updatePos(const std::string& x, const std::string &y) const
|
||||
@@ -83,3 +83,13 @@ void InGame::updateTime()
|
||||
void InGame::stopTimer() const {
|
||||
this->timer->stop();
|
||||
}
|
||||
|
||||
void InGame::addScore(int score) {
|
||||
this->score += score;
|
||||
this->updateScode();
|
||||
}
|
||||
|
||||
void InGame::setScore(int score) {
|
||||
this->score = score;
|
||||
this->updateScode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user