Forums

OverviewV-Play 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
    V-Play Team

    Hi,

    did you already find a solution? Can you post (or send to support@v-play.net) 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.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support