summaryrefslogtreecommitdiffstats
path: root/demos/declarative/samegame
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-07-17 04:35:17 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-07-17 04:35:17 (GMT)
commita1e83cdc5c30495a6110e8c8f11ae28723e2b0d5 (patch)
tree4689ebf3e700737b366db0a8509c4c762e34d506 /demos/declarative/samegame
parent4200dec4f01d8181a39704c149bc49c9a8882274 (diff)
parent43f131a0a5aaddf35b7b4b4c50468e2bb9db4965 (diff)
downloadQt-a1e83cdc5c30495a6110e8c8f11ae28723e2b0d5.zip
Qt-a1e83cdc5c30495a6110e8c8f11ae28723e2b0d5.tar.gz
Qt-a1e83cdc5c30495a6110e8c8f11ae28723e2b0d5.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Conflicts: demos/declarative/samegame/content/BoomBlock.qml
Diffstat (limited to 'demos/declarative/samegame')
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml9
1 files changed, 6 insertions, 3 deletions
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index 5e5cf18..542e7bc 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -5,8 +5,8 @@ Item { id:block
property int targetX: 0
property int targetY: 0
- x: Follow { enabled: spawned; source: targetX; spring: 1.2; damping: 0.1 }
- y: Follow { source: targetY; spring: 1.2; damping: 0.1 }
+ x: Follow { enabled: spawned; source: targetX; spring: 2; damping: 0.2 }
+ y: Follow { source: targetY; spring: 2; damping: 0.2 }
Image { id: img
source: {
@@ -22,9 +22,10 @@ Item { id:block
opacity: Behavior { NumberAnimation { properties:"opacity"; duration: 200 } }
anchors.fill: parent
}
+
Particles { id: particles
width:1; height:1; anchors.centeredIn: parent; opacity: 0
- lifeSpan: 1000000000; count:0; streamIn: false
+ lifeSpan: 700; lifeSpanDeviation: 600; count:0; streamIn: false
angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30
source: {
if(type == 0){
@@ -36,6 +37,7 @@ Item { id:block
}
}
}
+
states: [
State{ name: "AliveState"; when: spawned == true && dying == false
@@ -44,6 +46,7 @@ Item { id:block
State{ name: "DeathState"; when: dying == true
SetProperties { target: particles; count: 50 }
SetProperties { target: particles; opacity: 1 }
+ SetProperties { target: particles; emitting: false } // i.e. emit only once
SetProperties { target: img; opacity: 0 }
}
]