summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-07-16 01:09:49 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-07-16 01:09:49 (GMT)
commitbefae051c1f80d66f459f375279f36047017c194 (patch)
tree212a4c5440b6744351fe6e42b5991a8dad8bc72a /demos
parent87c97621a1b6ff958d773559f5c39db010c9b073 (diff)
downloadQt-befae051c1f80d66f459f375279f36047017c194.zip
Qt-befae051c1f80d66f459f375279f36047017c194.tar.gz
Qt-befae051c1f80d66f459f375279f36047017c194.tar.bz2
Update SameGame particles
Remove count:1 hack, make particles the right color.
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml23
-rw-r--r--demos/declarative/samegame/content/pics/blueStar.pngbin0 -> 2684 bytes
-rw-r--r--demos/declarative/samegame/content/pics/greenStar.pngbin0 -> 2675 bytes
-rw-r--r--demos/declarative/samegame/content/pics/redStar.pngbin0 -> 2676 bytes
4 files changed, 20 insertions, 3 deletions
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index 68e0e1a..0d05772 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -9,19 +9,36 @@ Item { id:block
y: Follow { source: targetY; spring: 1.2; damping: 0.1 }
Image { id: img
- source: {if(type==0){"pics/redStone.png";}else if(type==1){"pics/blueStone.png";}else{"pics/greenStone.png";}}
+ source: {
+ if(type == 0){
+ "pics/redStone.png";
+ } else if(type == 1) {
+ "pics/blueStone.png";
+ } else {
+ "pics/greenStone.png";
+ }
+ }
opacity: 0
opacity: Behavior { NumberAnimation { properties:"opacity"; duration: 200 } }
anchors.fill: parent
}
Particles { id: particles
width:1; height:1; anchors.centeredIn: parent; opacity: 0
- lifeSpan: 100000; source: "pics/star.png"; count:1; streamIn: false
+ lifeSpan: 1000000000; count:0; streamIn: false
angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30
+ source: {
+ if(type == 0){
+ "pics/redStar.png";
+ } else if (type == 1) {
+ "pics/blueStar.png";
+ } else {
+ "pics/greenStar.png";
+ }
+ }
}
states: [
- State{ name: "SpawnState"; when: spawning == true && dying == false
+ State{ name: "AliveState"; when: spawning == true && dying == false
SetProperties { target: img; opacity: 1 }
},
State{ name: "DeathState"; when: dying == true
diff --git a/demos/declarative/samegame/content/pics/blueStar.png b/demos/declarative/samegame/content/pics/blueStar.png
new file mode 100644
index 0000000..822dc53
--- /dev/null
+++ b/demos/declarative/samegame/content/pics/blueStar.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/greenStar.png b/demos/declarative/samegame/content/pics/greenStar.png
new file mode 100644
index 0000000..1abbcf0
--- /dev/null
+++ b/demos/declarative/samegame/content/pics/greenStar.png
Binary files differ
diff --git a/demos/declarative/samegame/content/pics/redStar.png b/demos/declarative/samegame/content/pics/redStar.png
new file mode 100644
index 0000000..b18834f
--- /dev/null
+++ b/demos/declarative/samegame/content/pics/redStar.png
Binary files differ