Doodle Jump Game
import Felgo 4.0
import QtQuick 2.0
import "../"
SceneBase {
id:menuScene
signal gameScenePressed
Image {
anchors.fill: menuScene.gameWindowAnchorItem
source: Qt.resolvedUrl("../../assets/background.png")
}
Column {
anchors.centerIn: parent
spacing: 20
Rectangle {
width: 150
height: 50
color: "orange"
Image {
id: gameSceneButton
source: Qt.resolvedUrl("../../assets/playButton.png")
anchors.centerIn: parent
}
MouseArea {
id: gameSceneMouseArea
anchors.fill: parent
onClicked: gameScenePressed()
}
}
Rectangle {
width: 150
height: 50
color: "orange"
visible: false
Image {
id: scoreSceneButton
source: Qt.resolvedUrl("../../assets/scoreButton.png")
anchors.centerIn: parent
}
MouseArea {
id: scoreSceneMouseArea
anchors.fill: parent
onClicked: frogNetworkView.visible = true
}
}
Row {
Image {
id: chartboostButton
source: Qt.resolvedUrl("../../assets/chartboostButton.png")
MouseArea {
anchors.fill: parent
onClicked: {
if(system.desktopPlatform)
NativeUtils.displayMessageBox("Ads are only available on iOS and Android. To test the Chartboost plugin, open the Doodle Jump game project and deploy the game to your iOS or Android device.")
else
chartboost.showInterstitial()
}
}
}
Image {
id: admobButton
source: Qt.resolvedUrl("../../assets/admobButton.png")
MouseArea {
anchors.fill: parent
onClicked: {
if(system.desktopPlatform)
NativeUtils.displayMessageBox("Ads are only available on iOS and Android. To test the AdMob plugin, open the Doodle Jump game project and deploy the game to your iOS or Android device.")
else
interstitial.loadInterstitial()
}
}
}
}
}
AdMobBanner {
adUnitId: " ca-app-pub-3940256099942544/6300978111"
banner: AdMobBanner.Smart
anchors.horizontalCenter: parent.Center
visible: !frogNetworkView.visible
testDeviceIds: ["7AA2ECE6469E41E0C8E5ABAFCC7A0BB9", "3385843ff1e43633521e3750a6d57fed", "28CA0A7F16015163A1C70EA42709318A"]
}
AdMobInterstitial {
id: interstitial
adUnitId: " ca-app-pub-3940256099942544/1033173712"
onInterstitialReceived: {
showInterstitialIfLoaded()
}
onInterstitialFailedToReceive: {
console.debug("Interstitial not loaded")
}
testDeviceIds: ["7AA2ECE6469E41E0C8E5ABAFCC7A0BB9", "3385843ff1e43633521e3750a6d57fed", "28CA0A7F16015163A1C70EA42709318A"]
}
Chartboost {
id: chartboost
appId: Qt.platform.os === System.IOS ? "55f2a8145b145373586f4b16" : "55f2a8155b145373586f4b18"
appSignature: Qt.platform.os === System.IOS ? "8b2d667bac3e06e60c08c06e4e63898fcad52cfd" : "f8b21bf14f5b85cc62612765300ce4c205664b0a"
shouldDisplayRewardedVideo: false
shouldRequestInterstitialsInFirstSession: true
onInterstitialCached: {
console.debug("InterstitialCached at location:", location)
}
onInterstitialFailedToLoad: {
console.debug("InterstitialFailedToLoad at location:", location, "error:", error)