Squaby Demo
import QtQuick 2.0
import Felgo 4.0
import "common"
GameWindow {
id: window
screenWidth: 960
screenHeight: 640
settings.style: SquabyStyle {}
property bool developerBuild: !system.publishBuild
property bool cheatMoneyEnabled: developerBuild
property int maximumParticles: (window.width < 960) ? 8 : 18
property int currentParticles: 0
Flurry {
id: flurry
apiKey: "QQT3CKTQDGF7XGMFSF97"
}
FontLoader {
id: jellyFont
source: Qt.resolvedUrl("fonts/JellyBelly.ttf")
}
FontLoader {
id: hudFont
source: Qt.resolvedUrl("fonts/COOPBL.ttf")
}
state: "main"
BackgroundMusic {
id: backgroundMusic
source: Qt.resolvedUrl(system.isPlatform(System.Symbian)||system.isPlatform(System.Meego)||system.isPlatform(System.BlackBerry)
? "../assets/snd/backgroundMusic.ogg"
: "../assets/snd/backgroundMusic.mp3")
volume: 0.6
}
Timer {
id: splashScreenOff
interval: 1000
onTriggered: {
if(splashLoader.item) {
splashLoader.item.exitScene()
}
}
}
Timer {
id: startLoading
interval: 1000
onTriggered: {
implLoader.source = "SquabyMainItem.qml"
}
}
Connections {
target: splashLoader.item ? splashLoader.item : null
function onLoadingFinished() {
if(implLoader.item) {
implLoader.item.activateMain()
}
splashLoader.source = ""
}
}
Loader {
id: splashLoader
source: Qt.resolvedUrl("SplashScreen.qml")
onLoaded: {
if(item) {
item.enterScene()
}
startLoading.start()
}
}
Loader {
id: implLoader
onLoaded: {
if(item) {
splashScreenOff.start()
}
}
}
onStateChanged: {
if(implLoader.item) implLoader.item.state = state
}
onApplicationPaused: {