diff options
author | Maximilian Goldstein <max.goldstein@qt.io> | 2021-04-30 10:46:58 +0200 |
---|---|---|
committer | Maximilian Goldstein <max.goldstein@qt.io> | 2021-04-30 10:57:33 +0200 |
commit | d21561ca2c547491fd99526f44579694ebeb457f (patch) | |
tree | 939adfcadc959fa15d4c5b25ccfe74187b7c1981 /examples/quick | |
parent | 9a7b31b736c1e4f68643c1c8ccce6d4177ac9bc6 (diff) |
examples: samegame4/BoomBlock.qml: Do not use unqualified access
Change-Id: I6e7d6b82605271478bfba9ff614f5748b58fffb7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml index 6ab2679744..12cc64a09b 100644 --- a/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml +++ b/examples/quick/tutorials/samegame/samegame4/content/BoomBlock.qml @@ -61,7 +61,7 @@ Item { property bool spawned: false Behavior on x { - enabled: spawned; + enabled: block.spawned; SpringAnimation{ spring: 2; damping: 0.2 } } Behavior on y { @@ -75,9 +75,9 @@ Item { anchors.fill: parent source: { - if (type == 0) + if (block.type == 0) return "../../shared/pics/redStone.png"; - else if (type == 1) + else if (block.type == 1) return "../../shared/pics/blueStone.png"; else return "../../shared/pics/greenStone.png"; @@ -97,9 +97,9 @@ Item { ImageParticle { // ![0] source: { - if (type == 0) + if (block.type == 0) return "../../shared/pics/redStar.png"; - else if (type == 1) + else if (block.type == 1) return "../../shared/pics/blueStar.png"; else return "../../shared/pics/greenStar.png"; @@ -123,13 +123,13 @@ Item { states: [ State { name: "AliveState" - when: spawned == true && dying == false + when: block.spawned == true && block.dying == false PropertyChanges { target: img; opacity: 1 } }, State { name: "DeathState" - when: dying == true + when: block.dying == true StateChangeScript { script: particles.burst(50); } PropertyChanges { target: img; opacity: 0 } StateChangeScript { script: block.destroy(1000); } |