summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/minehunt/Explosion.qml7
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml12
2 files changed, 8 insertions, 11 deletions
diff --git a/demos/declarative/minehunt/Explosion.qml b/demos/declarative/minehunt/Explosion.qml
index a997048..e337c46 100644
--- a/demos/declarative/minehunt/Explosion.qml
+++ b/demos/declarative/minehunt/Explosion.qml
@@ -16,13 +16,10 @@ Item {
velocity: 100
velocityDeviation: 20
z: 100
- opacity: 0
- streamIn: false
+ opacity: 1
}
states: [ State { name: "exploding"; when: explode == true
- PropertyChanges { target: particles; count: 200 }
- PropertyChanges { target: particles; opacity: 1 }
- PropertyChanges { target: particles; emitting: false } // i.e. emit only once
+ StateChangeScript {script: particles.burst(200); }
}
]
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index b0c297b..723e62a 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -26,9 +26,11 @@ Item { id:block
}
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";
@@ -45,9 +47,7 @@ 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); }
}