summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-11-05 04:03:47 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-11-05 04:46:23 (GMT)
commit0ef5d89b540be963d1a8131f6625f990a4fe66e8 (patch)
treefe640558b514dc1720525043b954aeafe3d15940 /examples/declarative/tutorials
parent0ced984d3e2cb2a7a1a219ae7a9b09ff4e15a55c (diff)
downloadQt-0ef5d89b540be963d1a8131f6625f990a4fe66e8.zip
Qt-0ef5d89b540be963d1a8131f6625f990a4fe66e8.tar.gz
Qt-0ef5d89b540be963d1a8131f6625f990a4fe66e8.tar.bz2
Particles cleaned up and placed in in qmlgraphics/
API changes: Removed bool streamIn Added int emissionRate Added int emissionVariance Added void burst(count, emissionRate=-1) While rewriting the internals to accomodate this, all other outstanding particles bugs were believed fixed. Task-number: QT-2392 QT-2391 QT-2390 QT-2406
Diffstat (limited to 'examples/declarative/tutorials')
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
index 7ad8b07..4c2ba43 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -31,9 +31,11 @@ Item { id:block
//![3]
Particles { id: particles
- width:1; height:1; anchors.centerIn: parent; opacity: 0
- lifeSpan: 700; lifeSpanDeviation: 600; count:0; streamIn: false
- angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30
+ width:1; height:1; anchors.centerIn: parent;
+ emissionRate: 0;
+ lifeSpan: 700; lifeSpanDeviation: 600;
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation:30;
source: {
if(type == 0){
"pics/redStar.png";
@@ -52,10 +54,9 @@ Item { id:block
PropertyChanges { target: img; opacity: 1 }
},
State{ name: "DeathState"; when: dying == true
- PropertyChanges { target: particles; count: 50 }
- PropertyChanges { target: particles; opacity: 1 }
- PropertyChanges { target: particles; emitting: false } // i.e. emit only once
+ StateChangeScript { script: particles.burst(50); }
PropertyChanges { target: img; opacity: 0 }
+ StateChangeScript { script: block.destroy(1000); }
}
]
//![4]