|
@@ -36,13 +36,13 @@ Item {
|
|
|
|
|
|
Item {
|
|
Item {
|
|
id: column
|
|
id: column
|
|
|
|
+ property int columnHeight: 0
|
|
|
|
|
|
function addImage() {
|
|
function addImage() {
|
|
- var colHeight = pictureArray.reduce(function (height, image) { return height + image.height; }, 0)
|
|
|
|
-
|
|
|
|
- if (colHeight < settings.columnBufferFactor*root.height) {
|
|
|
|
|
|
+ if (columnHeight < settings.columnBufferFactor*root.height) {
|
|
var item = pictureDelegate.createObject(column)
|
|
var item = pictureDelegate.createObject(column)
|
|
- item.y = -colHeight - item.height
|
|
|
|
|
|
+ columnHeight += item.height
|
|
|
|
+ item.y = (floor.y - 1) - columnHeight
|
|
d.itemCount++
|
|
d.itemCount++
|
|
pictureArray.push(item)
|
|
pictureArray.push(item)
|
|
}
|
|
}
|
|
@@ -80,18 +80,17 @@ Item {
|
|
|
|
|
|
Timer {
|
|
Timer {
|
|
id: pumpTimer
|
|
id: pumpTimer
|
|
- interval: Math.random()*500
|
|
|
|
|
|
+ interval: Math.random()*500 + 500
|
|
repeat: true
|
|
repeat: true
|
|
running: true
|
|
running: true
|
|
onTriggered: {
|
|
onTriggered: {
|
|
column.addImage()
|
|
column.addImage()
|
|
- interval = Math.random()*500 + 500
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
Timer {
|
|
Timer {
|
|
id: deathTimer
|
|
id: deathTimer
|
|
- running: true
|
|
|
|
|
|
+ running: columnHeight > root.height
|
|
repeat: true
|
|
repeat: true
|
|
interval: 1000*(settings.interval > 60 ? 60*(settings.interval-60) : settings.interval)*(Math.random()+1)
|
|
interval: 1000*(settings.interval > 60 ? 60*(settings.interval-60) : settings.interval)*(Math.random()+1)
|
|
onTriggered: {
|
|
onTriggered: {
|
|
@@ -100,6 +99,7 @@ Item {
|
|
image.world = bullshitWorld
|
|
image.world = bullshitWorld
|
|
image.freefall = true
|
|
image.freefall = true
|
|
d.itemCount--
|
|
d.itemCount--
|
|
|
|
+ columnHeight -= image.height
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|