summaryrefslogtreecommitdiffstats
path: root/demos/declarative
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-07-17 02:11:03 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-07-17 02:11:03 (GMT)
commit68cf34dbf4c5e240188a08f7dcca3a7343e2ef7f (patch)
tree4af501d53a95727dbd1077d442856f369e6dc663 /demos/declarative
parent205363fadaa0251a5210e193b35e06a0470c28e2 (diff)
downloadQt-68cf34dbf4c5e240188a08f7dcca3a7343e2ef7f.zip
Qt-68cf34dbf4c5e240188a08f7dcca3a7343e2ef7f.tar.gz
Qt-68cf34dbf4c5e240188a08f7dcca3a7343e2ef7f.tar.bz2
Be faster.
Feel faster.
Diffstat (limited to 'demos/declarative')
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml10
1 files changed, 7 insertions, 3 deletions
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index 0d05772..b7838dd 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -5,8 +5,9 @@ Item { id:block
property int targetX: 0
property int targetY: 0
- x: Follow { source: targetX; spring: 1.2; damping: 0.1 }
- y: Follow { source: targetY; spring: 1.2; damping: 0.1 }
+ x: Follow { source: targetX; spring: 2; damping: 0.2 }
+ y: Follow { source: targetY; spring: 2; damping: 0.2 }
+
Image { id: img
source: {
@@ -22,9 +23,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 +38,7 @@ Item { id:block
}
}
}
+
states: [
State{ name: "AliveState"; when: spawning == true && dying == false
@@ -44,6 +47,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 }
}
]