Flappy Bird Game
import Felgo 4.0
import QtQuick 2.0
Item {
id: audioManager
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