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 3.0
 import "../common" as Common
 import ".."
 import "../levels"
 import "../entities"
 import "../entities/powerUps"

 Common.LevelBase {
   id: scene

   // place an igloo in each corner
   Iglu {
     entityId: "iglu1"
     id: iglu1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: 25
       leftMargin: 80
     }
     igluBody.source: "../../assets/img/Iglu.png"
     rotation: 135
   }

   Iglu {
     entityId: "iglu2"
     id: iglu2
     anchors {
       top: scene.top
       left: scene.left
       topMargin: 80
       leftMargin: scene.width - 30
     }
     igluBody.source: "../../assets/img/Iglu.png"
     rotation: 225
   }

   Iglu {
     entityId: "iglu3"
     id: iglu3
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height - 80
       leftMargin: 30
     }
     rotation: 45
     igluBody.source: "../../assets/img/Iglu.png"
   }

   Iglu {
     entityId: "iglu4"
     id: iglu4
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height - 30
       leftMargin: scene.width - 80
     }
     rotation: 315
     igluBody.source: "../../assets/img/Iglu.png"
   }

   // place the lake in the center
   Lake {
     id: lake
     anchors.centerIn: parent
     lakeBody.source: "../../assets/img/Lake.png"
   }

   // snowmen in upper left und lower right corner
   Opponents {
     id: opponentSnowman1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3 * 2
       leftMargin: scene.width / 4 * 3
     }
     opponentBody.source: "../../assets/img/Snowman.gif"
   }

   Opponents {
     id: opponentSnowman2
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 3
       leftMargin: scene.width / 4
     }
     opponentBody.source: "../../assets/img/Snowman.gif"
   }

   // obstacles in upper right and lower left corner (2 each)
   Obstacle {
     id: obstacle1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6
       leftMargin: scene.width / 4 * 3 - 22
     }
     obstacleBody.source: "../../assets/img/Obstacle.png"
   }

   Obstacle {
     id: obstacle2
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 + 22
       leftMargin: scene.width / 4 * 3
     }
     obstacleBody.source: "../../assets/img/Obstacle.png"
   }

   Obstacle {
     id: obstacle3
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 5
       leftMargin: scene.width / 4 + 22
     }
     rotation: 0
     obstacleBody.source: "../../assets/img/Obstacle.png"
   }

   Obstacle {
     id: obstalce4
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 5 - 22
       leftMargin: scene.width / 4
     }
     rotation: 0
     obstacleBody.source: "../../assets/img/Obstacle.png"
   }

   Tree {
     entityId: "tree1"
     id: tree1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 2
       leftMargin: scene.width / 2 - lake.width / 3
     }
     treeBody.source: "../../assets/img/Tree.png"
   }

   PowerUpSpawn {
     entityId: "spawn1"
     id: spawn1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 2
       leftMargin: scene.width / 2 + lake.width / 3
     }
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded