aboutsummaryrefslogtreecommitdiffstats
path: root/examples/demos
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2012-07-17 18:32:16 +1000
committerQt by Nokia <qt-info@nokia.com>2012-07-24 05:01:59 +0200
commitdbe4d2010816f1f22f48f3f5bce0d15d3ad7a7e2 (patch)
treed8e205e14e5497411ee7dd3d9a3c569851b73fb6 /examples/demos
parentbd2493e21d7619e448b205f215777d1d7b023075 (diff)
Particle example restyling
For self-contained particle systems, placing them inside the ParticleSystem element is encouraged. Change-Id: Iafc5a94bb07c4c0dac0daec300d01e0fde165146 Reviewed-by: Yann Bodson <yann.bodson@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'examples/demos')
-rw-r--r--examples/demos/maroon/content/GameOverScreen.qml70
-rw-r--r--examples/demos/maroon/maroon.qml53
2 files changed, 56 insertions, 67 deletions
diff --git a/examples/demos/maroon/content/GameOverScreen.qml b/examples/demos/maroon/content/GameOverScreen.qml
index d4a67a2945..343bd7aba6 100644
--- a/examples/demos/maroon/content/GameOverScreen.qml
+++ b/examples/demos/maroon/content/GameOverScreen.qml
@@ -55,50 +55,44 @@ Item {
}
ParticleSystem {
- id: particles
- }
-
- ImageParticle {
- id: cloud
anchors.fill: parent
- system: particles
- source: "gfx/cloud.png"
- alphaVariation: 0.25
- opacity: 0.25
- smooth: true
- }
+ ImageParticle {
+ id: cloud
+ source: "gfx/cloud.png"
+ alphaVariation: 0.25
+ opacity: 0.25
+ smooth: true
+ }
- Wander {
- system: particles
- anchors.fill: parent
- xVariance: 100;
- pace: 1;
- }
+ Wander {
+ xVariance: 100;
+ pace: 1;
+ }
- Emitter {
- id: cloudLeft
- system: particles
- width: 160
- height: 160
- anchors.right: parent.left
- emitRate: 0.5
- lifeSpan: 12000
- velocity: PointDirection{ x: 64; xVariation: 2; yVariation: 2 }
- size: 160
- }
+ Emitter {
+ id: cloudLeft
+ width: 160
+ height: 160
+ anchors.right: parent.left
+ emitRate: 0.5
+ lifeSpan: 12000
+ velocity: PointDirection{ x: 64; xVariation: 2; yVariation: 2 }
+ size: 160
+ }
- Emitter {
- id: cloudRight
- system: particles
- width: 160
- height: 160
- anchors.left: parent.right
- emitRate: 0.5
- lifeSpan: 12000
- velocity: PointDirection{ x: -64; xVariation: 2; yVariation: 2 }
- size: 160
+ Emitter {
+ id: cloudRight
+ width: 160
+ height: 160
+ anchors.left: parent.right
+ emitRate: 0.5
+ lifeSpan: 12000
+ velocity: PointDirection{ x: -64; xVariation: 2; yVariation: 2 }
+ size: 160
+ }
}
+
Text {
visible: gameCanvas != undefined
text: "You saved " + gameCanvas.score + " fishes!"
diff --git a/examples/demos/maroon/maroon.qml b/examples/demos/maroon/maroon.qml
index c3b736bd65..9511a0f06f 100644
--- a/examples/demos/maroon/maroon.qml
+++ b/examples/demos/maroon/maroon.qml
@@ -56,42 +56,37 @@ Item {
ParticleSystem {
id: particles
- }
-
- ImageParticle {
- id: bubble
- anchors.fill: parent
- system: particles
- source: "content/gfx/catch.png"
- opacity: 0.25
- smooth: true
- }
- Wander {
- system: particles
anchors.fill: parent
- xVariance: 25;
- pace: 25;
- }
- Emitter {
- id: fire
- system: particles
+ ImageParticle {
+ id: bubble
+ anchors.fill: parent
+ source: "content/gfx/catch.png"
+ opacity: 0.25
+ smooth: true
+ }
- width: parent.width
- height: 150
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 3
- startTime: 15000
+ Wander {
+ xVariance: 25;
+ pace: 25;
+ }
- emitRate: 2
- lifeSpan: 15000
+ Emitter {
+ width: parent.width
+ height: 150
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 3
+ startTime: 15000
- acceleration: PointDirection{ y: -6; xVariation: 2; yVariation: 2 }
+ emitRate: 2
+ lifeSpan: 15000
- size: 24
- sizeVariation: 16
- }
+ acceleration: PointDirection{ y: -6; xVariation: 2; yVariation: 2 }
+ size: 24
+ sizeVariation: 16
+ }
+ }
}
Column {