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

Platformer with Level Editor

 import QtQuick 2.0
 import Felgo 3.0
 import "../editorElements"

 PlatformerEntityBaseDraggable {
   id: platform
   entityType: "platform"

   // set the size to the sprite's size
   width: image.width
   height: image.height

   // define colliderComponent for collision detection while dragging
   colliderComponent: collider

   // set image
   image.source: "../../assets/platform/platform.png"

   BoxCollider {
     id: collider

     // set size and position to fit the sprite
     width: parent.width
     height: parent.height / 2

     anchors.horizontalCenter: parent.horizontalCenter
     anchors.top: parent.top

     // this entity shouldn't move
     bodyType: Body.Static

     // Category5: solids
     categories: Box.Category5
     // Category1: player body, Category2: player feet sensor,
     // Category3: opponent body, Category4: opponent sensor
Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded