Doodle Jump Game
import Felgo 4.0
import QtQuick 2.0
import "scenes"
GameWindow {
id: gameWindow
screenWidth: 640
screenHeight: 960
activeScene: gameScene
EntityManager {
id: entityManager
entityContainer: gameScene
}
GoogleAnalytics {
id: ga
propertyId: "UA-67377753-2"
}
FelgoGameNetwork {
id: gameNetwork
gameId: 173
secret: "doodlefrogsecret12345"
gameNetworkView: frogNetworkView
achievements: [
Achievement {
key: "5opens"
name: "Game Opener"
target: 5
points: 10
description: "Open this game 5 times"
},
Achievement {
key: "die100"
name: "Y U DO DIS?"
iconSource: Qt.resolvedUrl("../assets/achievementImage.png")
target: 100
description: "Die 100 times"
}
]
}
GameScene {
id: gameScene
onMenuScenePressed: {
gameWindow.state = "menu"
ga.logEvent("Click", "MenuScene")
}
}
MenuScene {
id: menuScene
onGameScenePressed: {
gameWindow.state = "game"
ga.logEvent("Click", "GameScene")
}
GameNetworkView {
id: frogNetworkView
visible: false
anchors.fill: parent.gameWindowAnchorItem
onShowCalled: {
frogNetworkView.visible = true
}
onBackClicked: {
frogNetworkView.visible = false
}
}
}
state: "menu"
states: [
State {
name: "menu"
PropertyChanges {target: menuScene; opacity: 1}
PropertyChanges {target: gameWindow; activeScene: menuScene}
},
State {
name: "game"
PropertyChanges {target: gameScene; opacity: 1}
PropertyChanges {target: gameWindow; activeScene: gameScene}