ChickenOutbreak2 Demo
import QtQuick 2.0
import Felgo 4.0
Item {
Component.onCompleted: {
fallingHen1.x = Math.random() * creditsScene.width
fallingHen2.x = Math.random() * creditsScene.width
}
Item {
id: fallingHen1
y: -90
Image {
source: store.blackHen.purchased ? "../assets/chicken2-front.png" : "../assets/chicken4-front.png"
width: 30
height: 30
}
onYChanged: {
if(y >= creditsScene.height + 85) x = Math.random() * creditsScene.width
}
}
PropertyAnimation {
id: falling1
target: fallingHen1
properties: "y"
to: creditsScene.height + 90
duration: 1000
running: true
loops: Animation.Infinite
}
Item {
id: fallingHen2
y: -90
Image {
source: store.blackHen.purchased ? "../assets/chicken2-front.png" : "../assets/chicken4-front.png"
width: 30
height: 30
}
onYChanged: {
if(y >= creditsScene.height + 85) x = Math.random() * creditsScene.width
}
}
PropertyAnimation {
id: falling
target: fallingHen2
properties: "y"
to: creditsScene.height + 90
duration: 2400
running: true