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

Forums

OverviewFelgo 1 Support › Remove Entity when it leaves the Screen

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4484

    phil.jahoda

    Hi, I have a dartarrow entity, and what I want to do is remove it when it leaves the screen.

    Therefore, I thought of using the onYChanged method.

    How can I remove “the” entity in its own onYchanged method?

     

    EntityBase {
        id: entity
        entityType: "dartarrow"
    
        onYChanged: {
            // HOW TO REMOVE AN ENTITY HERE?
        }
    
        property bool showed: false
        property int number
        property real speed: 1000.0
    
         BoxCollider {
             // some more code here...
         }
    }
    
    

     

    #4486

    phil.jahoda

    Consider this problem solved.

    You can easily remove an entity by calling id.removeEntity(); within the entity.

Viewing 2 posts - 1 through 2 (of 2 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