Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Durdles - 2-Player Action Game

 import QtQuick 2.0
 import Felgo 4.0
 import "../common" as Common
 import ".."
 import "../levels"
 import "../entities"
 import "../entities/powerUps"

 Common.LevelBase {
   id: scene

   // igloo in the upper right corner
   Iglu {
     entityId: "iglu1"
     id: iglu1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: iglu1.igluBody.height
       leftMargin: scene.width - iglu1.igluBody.width / 2
     }
     z: 2
     igluBody.source: Qt.resolvedUrl("../../assets/img/Iglu.png")
     rotation: 225
   }

   // igloo in the lower left corner
   Iglu {
     entityId: "iglu2"
     id: iglu2
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height - iglu2.igluBody.height
       leftMargin: iglu2.igluBody.width / 2
     }
     z: 2
     igluBody.source: Qt.resolvedUrl("../../assets/img/Iglu.png")
     rotation: 45
   }

   // plant a row of trees at the bottom
   // from left to right
   Tree {
     entityId: "tree1"
     id: tree1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 * 2 - 5
       leftMargin: 30
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree2"
     id: tree2
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 * 2 - 17
       leftMargin: 40 + tree2.treeBody.width
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree3"
     id: tree3
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 * 2 + 2
       leftMargin: 30 + tree3.treeBody.width * 2
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree5"
     id: tree5
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 * 2 + 5
       leftMargin: 2 + tree5.treeBody.width * 4
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree6"
     id: tree6
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 * 2 - 15
       leftMargin: tree6.treeBody.width * 5
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree7"
     id: tree7
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 * 2 - 3
       leftMargin: tree7.treeBody.width * 6 - 10
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   // plant a row of trees at the top
   // from right to left
   Tree {
     entityId: "tree9"
     id: tree9
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 + 10
       leftMargin: scene.width - tree9.treeBody.width + 10
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree10"
     id: tree10
     anchors {
       top: scene.top
       left: scene.left
       topMargin: 5 + scene.height / 3
       leftMargin: scene.width - tree10.treeBody.width * 2
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree11"
     id: tree11
     anchors {
       top: scene.top
       left: scene.left
       topMargin: 20 + scene.height / 3
       leftMargin: 5 + scene.width - tree11.treeBody.width * 3
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree12"
     id: tree12
     anchors {
       top: scene.top
       left: scene.left
       topMargin: 12 + scene.height / 3
       leftMargin: -3 + scene.width - tree12.treeBody.width * 4
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree13"
     id: tree13
     anchors {
       top: scene.top
       left: scene.left
       topMargin: 17 + scene.height / 3
       leftMargin: 10 + scene.width - tree13.treeBody.width * 5
     }
     treeBody.source: Qt.resolvedUrl("../../assets/img/Tree.png")
   }

   Tree {
     entityId: "tree14"
     id: tree14
     anchors {
       top: scene.top
       left: scene.left
       topMargin: 1 + scene.height / 3
       leftMargin: scene.width - tree14.treeBody.width * 6 + 10
     }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded