Add game timer
This commit is contained in:
parent
7ef0ade0b3
commit
e46d153604
|
@ -50,10 +50,19 @@ ApplicationWindow {
|
||||||
property real cardHeight: Math.min((app.height - Math.min(app.height * 0.08, 50)) / (maxCardsPerColumn * 0.2 + 2.65), (app.width / 8.05) * 1.4)
|
property real cardHeight: Math.min((app.height - Math.min(app.height * 0.08, 50)) / (maxCardsPerColumn * 0.2 + 2.65), (app.width / 8.05) * 1.4)
|
||||||
property real cardWidth: cardHeight / 1.4
|
property real cardWidth: cardHeight / 1.4
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: gameTimer
|
||||||
|
interval: 1000
|
||||||
|
running: true
|
||||||
|
repeat: true
|
||||||
|
onTriggered: scoreBar.time += 1
|
||||||
|
}
|
||||||
|
|
||||||
ScoreBar {
|
ScoreBar {
|
||||||
id: scoreBar
|
id: scoreBar
|
||||||
|
|
||||||
moves: GameState.moveAmount
|
moves: GameState.moveAmount
|
||||||
|
time: 0
|
||||||
|
|
||||||
height: Math.max(parent.height * 0.08, 50)
|
height: Math.max(parent.height * 0.08, 50)
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
|
|
Loading…
Reference in a new issue