summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-07-17 03:59:20 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-07-17 03:59:20 (GMT)
commit43f131a0a5aaddf35b7b4b4c50468e2bb9db4965 (patch)
treeb923808cc4f4cb7b940e8d15f451ca877122c29d /demos
parentc01d748e2afcf6cf31957d78c08f95bf9ec7da6e (diff)
parent68cf34dbf4c5e240188a08f7dcca3a7343e2ef7f (diff)
downloadQt-43f131a0a5aaddf35b7b4b4c50468e2bb9db4965.zip
Qt-43f131a0a5aaddf35b7b4b4c50468e2bb9db4965.tar.gz
Qt-43f131a0a5aaddf35b7b4b4c50468e2bb9db4965.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml10
1 files changed, 7 insertions, 3 deletions
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index 0d05772..b7838dd 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -5,8 +5,9 @@ Item { id:block
property int targetX: 0
property int targetY: 0
- x: Follow { source: targetX; spring: 1.2; damping: 0.1 }
- y: Follow { source: targetY; spring: 1.2; damping: 0.1 }
+ x: Follow { source: targetX; spring: 2; damping: 0.2 }
+ y: Follow { source: targetY; spring: 2; damping: 0.2 }
+
Image { id: img
source: {
@@ -22,9 +23,10 @@ Item { id:block
opacity: Behavior { NumberAnimation { properties:"opacity"; duration: 200 } }
anchors.fill: parent
}
+
Particles { id: particles
width:1; height:1; anchors.centeredIn: parent; opacity: 0
- lifeSpan: 1000000000; count:0; streamIn: false
+ lifeSpan: 700; lifeSpanDeviation: 600; count:0; streamIn: false
angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30
source: {
if(type == 0){
@@ -36,6 +38,7 @@ Item { id:block
}
}
}
+
states: [
State{ name: "AliveState"; when: spawning == true && dying == false
@@ -44,6 +47,7 @@ Item { id:block
State{ name: "DeathState"; when: dying == true
SetProperties { target: particles; count: 50 }
SetProperties { target: particles; opacity: 1 }
+ SetProperties { target: particles; emitting: false } // i.e. emit only once
SetProperties { target: img; opacity: 0 }
}
]