na aba do Ator.js
//codigo do ator
let yAtor=366;
let xAtor=84;
let colisao=false;
let meuspontos=0;
function mostraAtor(){
image(pngAtor,xAtor,yAtor,30,30 )}
function movimentaAtor(){
if (keyIsDown(UP_ARROW)){
yAtor -=3;}
if (keyIsDown(DOWN_ARROW)){
yAtor +=3;}}
function verificaColisao(){
//collideRectCircle(x1, y1, width1, height1, cx, cy, diameter)
for(let i=0;i<pngCarros.length;i=i+1){ colisao=collideRectCircle(xCarros[i],yCarros[i],comprimentoCarro,alturaCarro,xAtor,yAtor,15)
if (colisao){colidiu();
}}}
function colidiu(){
yAtor=366;
}
function mostrarPontos(){
textAlign(CENTER);
textSize(25)
fill(color(255,165,80)
text(meuspontos,width/5,27);
}