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

ChickenOutbreak2 Demo

 import QtQuick 2.0
 import Felgo 4.0

 Item {
   width: buttonID.width
   height: buttonID.height
   opacity: 0

   Image {
     id: buttonID
     source: Qt.resolvedUrl("../assets/button.png")
     width: 160
     height: 25
   }

   Image {
     source: Qt.resolvedUrl("../assets/coin_single.png")
     width: 15.25
     height: 20
     anchors.verticalCenter: parent.verticalCenter
     anchors.right: textID.left
     anchors.rightMargin: 10
   }

   Text {
     id: textID
     color: "#f1ed00"
     font.family: fontHUD.name
     font.pixelSize: 20
     text: qsTr("Level ") + level.difficulty + qsTr(" reached")
     anchors.centerIn: parent
   }

   function newLevelReached() {
     newLevelDelay.start()
   }

   function giveBonusAfterDelay() {
     opacity = 1
     audioManager.play(audioManager.idPLING)
     displayTimer.start()
   }

   Timer {
     id: displayTimer
     interval: 1000
     running: false
     onTriggered: parent.opacity = 0
   }

   Timer {
     id: newLevelDelay
     interval: 500
     running: false
     onTriggered: giveBonusAfterDelay()
   }

   Behavior on opacity {
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded