Timer {
interval: 25
running: true
repeat: true
onTriggered: deplacement()
}
function deplacement(){
for(indexD = 0; indexD < tab.length; indexD++){
if(tab[indexD].x <= width - (tab[indexD].width + 50) && tabSens[indexD]){
tab[indexD].x += tabVit[indexD]
if(tab[indexD].x >= width - (tab[indexD].width + 50))
tabSens[indexD]= false
}
else if(tab[indexD].x >= 50 && !tabSens[indexD]){
tab[indexD].x -= tabVit[indexD]
if(tab[indexD].x <= 50)
tabSens[indexD]= true
}
}
}