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

Forums

OverviewFelgo 1 Support › Projectile removal / onCompleted issue

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7201

    Senad

    Hi,

     

    I have a very simple app that has a rectangle on bottom and it shoots projectiles upwards.

    when the projectile reaches its desired destination that projectile should get removed with onCompleted option..

     

    I have this component as the projectile :

    Component {
      id: projectile
      EntityBase {
        id:projectileEntity
        entityId: "projectile"
        entityType: "projectile"
        //x: 100
        Image {
          id:projectileSprite
          source: "img/asteroid.png"
          width: 4
          height: 4
        }
        CircleCollider {
          radius: projectileSprite.width/2
          anchors.centerIn: parent
          bodyType: Body.Static
        }
        // these values can then be set when a new projectile is created in the MouseArea below
        property alias to: moveTo.to
        property alias duration: moveTo.duration
        PropertyAnimation on pos {
          id: moveTo
          from: ship.pos
          alwaysRunToEnd: true
          // the "to" and "duration" property will be set for each entity differently
          onCompleted: {
            console.debug("Completed ");
            removeEntity()
          }
        }
      }
    }

     

    The problem I’m running into is that only odd numbered (1,3,5 ect..) projectiles get removed and the others are left on the scene hanging..

     

    What am I doing wrong here.

     

    Thanks

     

    #7234

    Alex
    Felgo Team

    Hi,

    did you already find a solution? Can you post (or send to support@felgo.com) a small running example that contains the error so we can reproduce and debug the issue?

    Cheers,
    Alex

    #7237

    Senad

    Hi,

     

    i found a way.  thanks

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded