aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@digia.com>2012-12-13 16:19:46 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-14 07:41:59 +0100
commitc48ea83a0da33f702f738707b6a10efcdda75641 (patch)
treec273a26c31ec15db1eff10f60c435259aeea69bc /examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml
parent8ac4e62fe50b3f4d9abc8136a98babe4d306f686 (diff)
Fixed samegame tutorial part 4 to reflect Quick2 state
Change-Id: I61a3d63bc0268256ff6497339a6d97719a59860f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml')
-rw-r--r--examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml39
1 files changed, 23 insertions, 16 deletions
diff --git a/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml
index 335f4aecf6..5b9928e018 100644
--- a/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml
+++ b/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml
@@ -39,7 +39,7 @@
****************************************************************************/
import QtQuick 2.0
-import Qt.labs.particles 1.0
+import QtQuick.Particles 2.0
Item {
id: block
@@ -81,23 +81,30 @@ Item {
//![2]
//![3]
- Particles {
- id: particles
-
- width: 1; height: 1
+ ParticleSystem {
+ id: sys
anchors.centerIn: parent
+ ImageParticle {
+ // ![0]
+ source: {
+ if (type == 0)
+ return "../../shared/pics/redStar.png";
+ else if (type == 1)
+ return "../../shared/pics/blueStar.png";
+ else
+ return "../../shared/pics/greenStar.png";
+ }
+ rotationVelocityVariation: 360
+ // ![0]
+ }
- emissionRate: 0
- lifeSpan: 700; lifeSpanDeviation: 600
- angle: 0; angleDeviation: 360;
- velocity: 100; velocityDeviation: 30
- source: {
- if (type == 0)
- return "../../shared/pics/redStar.png";
- else if (type == 1)
- return "../../shared/pics/blueStar.png";
- else
- return "../../shared/pics/greenStar.png";
+ Emitter {
+ id: particles
+ anchors.centerIn: parent
+ emitRate: 0
+ lifeSpan: 700
+ velocity: AngleDirection {angleVariation: 360; magnitude: 80; magnitudeVariation: 40}
+ size: 16
}
}
//![3]