Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Flappy Bird Game

 import QtQuick 2.0
 import Felgo 4.0
 import "../common"

 SceneBase {
   id: scene

   property alias gameNetwork: gameNetwork

   property alias initialStateBeforeShow: gameNetworkView.initialStateBeforeShow

   GameNetworkView {
     id: gameNetworkView
     anchors.fill: scene.gameWindowAnchorItem

     // no achievements used yet, so do not show the achievements icon
     showAchievementsHeaderIcon: false

     onBackClicked: {
       scene.backButtonPressed()
     }
   }

   FelgoGameNetwork {
     id: gameNetwork
     // received from the GameNetwork dashboard at https://cloud.felgo.com
     gameId: 105
     secret: "flappyBirdDevPasswordForVPlayGameNetwork"
     gameNetworkView: gameNetworkView

     onNewHighscore: {
       if(!isUserNameSet(userName)) {
         NativeUtils.displayTextInput("Congratulations!", "You achieved a new highscore. What is your player name for comparing your scores?", "")
       }
     }
   }

   Connections {
     target: NativeUtils
     onTextInputFinished: {
       if(accepted) {
         var validUserName = gameNetwork.updateUserName(enteredText)
       }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded