summaryrefslogtreecommitdiffstats
path: root/examples/declarative/minehunt/Explosion.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/minehunt/Explosion.qml')
-rw-r--r--examples/declarative/minehunt/Explosion.qml15
1 files changed, 12 insertions, 3 deletions
diff --git a/examples/declarative/minehunt/Explosion.qml b/examples/declarative/minehunt/Explosion.qml
index 2886559..84e93d4 100644
--- a/examples/declarative/minehunt/Explosion.qml
+++ b/examples/declarative/minehunt/Explosion.qml
@@ -2,17 +2,26 @@ Item {
property bool explode : false
Particles {
+ id: particles
width: 38
height: 21
- lifeSpan: 3600000
+ lifeSpan: 1000
lifeSpanDeviation: 0
source: "pics/star.png"
- count: 200
+ count: 0
angle: 270
angleDeviation: 360
velocity: 100
velocityDeviation: 20
z: 100
- emitting: explode
+ opacity: 0
+ streamIn: false
}
+ states: [ State { name: "exploding"; when: explode == true
+ SetProperties { target: particles; count: 200 }
+ SetProperties { target: particles; opacity: 1 }
+ SetProperties { target: particles; emitting: false } // i.e. emit only once
+ }
+ ]
+
}