Forums

OverviewV-Play 1 Support › ParallaxScrollingBackground for flappybird

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7151

    John

    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
    }
    }

    #7170

    Alex
    V-Play Team

    Hi,

    where did you put your ParallaxScrollingBackground item, in the GameScene.qml or in the Level.qml? Because the GameScene.qml already has methods startGame() and stopGame() where you could change the running property and the Level.qml already has start() and stop() methods. In your example above however, you used startGame() and stop(). Make sure your functions are called correctly, e.g. with console.debug(“…”) messages.

    Cheers,
    Alex

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support