younger32 / youger32-projetos

projetos
1 stars 0 forks source link

projeto-1 #2

Closed younger32 closed 1 month ago

younger32 commented 1 month ago

let player; let obstacles = []; let gameOver = false;

function setup() { createCanvas(400, 400); player = new Player(); }

function draw() { background(220);

if (!gameOver) { player.update(); player.display();

if (frameCount % 60 === 0) {
  obstacles.push(new Obstacle());
}

[let player; let obstacles = []; let gameOver = false;

function setup() { createCanvas(400, 400); player = new Player(); }

function draw() { background(220);

if (!gameOver) { player.update(); player.display();

if (frameCount % 60 === 0) {
  obstacles.push(new Obstacle());
}](url)