im trying to create background scrolling for flappybird and I want it to start when game starts and to stop when player crashes …I have this so far for the background.qml but it just scrolls and doesn’t stop.. any ideas?
ParallaxScrollingBackground {
id: bg
movementVelocity: Qt.point(10,0)
ratio: Qt.point(1.0,1.0)
sourceImage: “../img/bg-sd.png”
function startGame() {
bg.running = true
}
function stop() {
bg.running = false
}
}