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

Flappy Bird Game

 import Felgo 4.0
 import QtQuick 2.0

 Item {
   id: audioManager

   // Use Sound IDs to play Sounds e.g. audioManager.play(audioManager.idDIE)
   property int idDIE: 11
   property int idHIT: 22
   property int idPOINT: 33
   property int idSWOOSHING: 44
   property int idWING: 55

   function play(clipID) {

     switch(clipID) {
     case idDIE:
       die.play()
       break
     case idHIT:
       hit.play()
       break
     case idPOINT:
       point.play()
       break
     case idSWOOSHING:
       swoosh.play()
       break
     case idWING:
       wing.play()
       break
     }
   }

   GameSoundEffect {
     id: die
     source: Qt.resolvedUrl("../../assets/audio/sfx_die.wav")
   }
   GameSoundEffect {
     id: hit
     source: Qt.resolvedUrl("../../assets/audio/sfx_hit.wav")
   }
   GameSoundEffect {
     id: point
     source: Qt.resolvedUrl("../../assets/audio/sfx_point.wav")
   }
   GameSoundEffect {
     id: swoosh
     source: Qt.resolvedUrl("../../assets/audio/sfx_swooshing.wav")
   }
   GameSoundEffect {
     id: wing
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded