aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/touchinteraction/multipointtouch/content
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/touchinteraction/multipointtouch/content')
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml2
-rw-r--r--examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml9
2 files changed, 7 insertions, 4 deletions
diff --git a/examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml b/examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml
index 5750ffcad1..56f287666f 100644
--- a/examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml
+++ b/examples/quick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml
@@ -66,7 +66,7 @@ TouchPoint {
interval: 100
running: false
repeat: false
- onTriggered: child.enabled = false
+ onTriggered: container.child.enabled = false
}
property Item child: SpriteGoal {
enabled: false
diff --git a/examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml b/examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml
index 3db9eaf1e5..8da5949a1b 100644
--- a/examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml
+++ b/examples/quick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml
@@ -52,6 +52,9 @@ import QtQuick.Particles 2.0
ParticleSystem {
id: particleSystem
+
+ property int score
+
function explode(x,y) {
fireEmitter.burst(100,x,y);
}
@@ -116,13 +119,13 @@ ParticleSystem {
once: true
y: parent.height - 32
groups: "bears"
- onAffectParticles: {
+ onAffectParticles: function(particles) {
for (var i=0;i<particles.length; i++) {
if (particles[i].animationIndex != 0) {
- score++;
+ particleSystem.score++;
bloodEmitter.burst(100, particles[i].x, particles[i].y);
} else {
- score--;
+ particleSystem.score--;
heartEmitter.burst(100, particles[i].x, particles[i].y);
}
particles[i].update = 1.0;