Find the Best Demos and Examples

Check out this quick tour to find the best demos and examples for you, and to see how the Felgo SDK can help you to develop your next app or game!

StackTheBoxWithEditor Demo

 import QtQuick 2.0
 import Felgo 3.0
  // for accessing the Body.Static type

 EntityBase {
   entityType: "wall"

   // this gets used by the top wall to detect when the game is over
   signal collidedWithBox

   // this allows setting the color property or the Rectangle from outside, to use another color for the top wall
   property alias color: rectangle.color

   Rectangle {
     id: rectangle
     color: "blue"
     anchors.fill: parent
   BoxCollider {
     anchors.fill: parent
     // use "" to access the Body.Static type
     bodyType: Body.Static // the body shouldnt move

     fixture.onBeginContact: {
       // for access of the collided entity and the entityType and entityId:
       var collidedEntity = other.getBody().target;
       var collidedEntityType = collidedEntity.entityType;
       // avoid emitting the signal at collision with obstacle while in levelEditing mode
       // otherwise the game would be reset if an obstacle would collide with the top wall
       if(collidedEntityType === "box")