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

   //obstacles from top left to bottom right
   Obstacle {
     id: obstacle1
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6
       leftMargin: scene.width / 4
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle2
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6
       leftMargin: scene.width / 4 * 3
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle3
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 2
       leftMargin: scene.width / 3
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle4
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 2
       leftMargin: scene.width / 3 * 2
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle5
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 3
       leftMargin: scene.width / 5
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle6
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 3
       leftMargin: scene.width / 5 * 4
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle7
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 4
       leftMargin: scene.width / 3
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle8
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 4
       leftMargin: scene.width / 3 * 2
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle9
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 5
       leftMargin: scene.width / 4
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

   Obstacle {
     id: obstacle10
     z: -1
     anchors {
       top: scene.top
       left: scene.left
       topMargin: scene.height / 6 * 5
       leftMargin: scene.width / 4 * 3
     }
     obstacleBody.source: Qt.resolvedUrl("../../assets/img/Obstacle.png")
   }

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