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...
}
}